[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] Which class to derive from for filter with
From:       David Doria <daviddoria+vtk () gmail ! com>
Date:       2009-11-27 14:48:01
Message-ID: c19fcadc0911270648w34f291a9we348580df62bc09 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


You'll have to excuse my new-ness on this one, I've never dug down

> into the real workings of the pipeline.
> 
> It seems that vtkGraphAlgorithm::ProcessRequest is calling with
> REQUEST_DATA_OBJECT rather than REQUEST_DATA as is usually the case in
> filters that I have derived from vtkPolyDataAlgorithm. What is the
> difference between these?
> 
> Now that I have overriden RequestDataObject (with
> vtkNearestNeighborGraph::RequestDataObject), the cast of the output to
> a vtkGraph seems to be the part that is failing:
> vtkGraph* output = vtkGraph::SafeDownCast(
> 
> outInfo->Get(vtkDataObject::DATA_OBJECT()));
> 
> output is invalid after this cast. Any hints on why that would be? The
> output should be a vtkGraph by definition of vtkGraphAlgorithm, right?
> 
> Here is the latest version:
> http://rpi.edu/~doriad/VTK_List/vtkNearestNeighborGraph/<http://rpi.edu/%7Edoriad/VTK_List/vtkNearestNeighborGraph/>
>  
> Any pointers are much appreciated!
> 
> Thanks,
> 
> David
> 

I found some similar things in Infovis. I stripped them down to see what was
required. Here is a barebones example for anyone interested.

http://www.vtk.org/Wiki/VTK_Examples_vtkGraphAlgorithm_Source

Thanks,

David


[Attachment #5 (text/html)]

You&#39;ll have to excuse my new-ness on this one, I&#39;ve never dug down<br><div \
class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

into the real workings of the pipeline.<br>
<br>
It seems that vtkGraphAlgorithm::ProcessRequest is calling with<br>
REQUEST_DATA_OBJECT rather than REQUEST_DATA as is usually the case in<br>
filters that I have derived from vtkPolyDataAlgorithm. What is the<br>
difference between these?<br>
<br>
Now that I have overriden RequestDataObject (with<br>
vtkNearestNeighborGraph::RequestDataObject), the cast of the output to<br>
a vtkGraph seems to be the part that is failing:<br>
<div class="im">  vtkGraph* output = vtkGraph::SafeDownCast(<br>
<br>
outInfo-&gt;Get(vtkDataObject::DATA_OBJECT()));<br>
<br>
</div>output is invalid after this cast. Any hints on why that would be? The<br>
output should be a vtkGraph by definition of vtkGraphAlgorithm, right?<br>
<div class="im"><br>
Here is the latest version:<br>
</div><a href="http://rpi.edu/%7Edoriad/VTK_List/vtkNearestNeighborGraph/" \
target="_blank">http://rpi.edu/~doriad/VTK_List/vtkNearestNeighborGraph/</a><br> <br>
Any pointers are much appreciated!<br>
<br>
Thanks,<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br>I found some similar things in Infovis. I stripped them \
down to see what was required. Here is a barebones example for anyone \
interested.<br><br><a \
href="http://www.vtk.org/Wiki/VTK_Examples_vtkGraphAlgorithm_Source">http://www.vtk.org/Wiki/VTK_Examples_vtkGraphAlgorithm_Source</a><br \
clear="all"> <br>Thanks,<br><br>David<br>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic