[vtkusers] Regarding dendrogram

Andinet Enquobahrie andinet.enqu at kitware.com
Mon Jun 13 13:35:29 EDT 2011


Hi Ankit:

One way you can generate dendrogram's in VTK is by using the VTK-R  interface.

Here is a a good article on this integration

http://www.kitware.com/products/html/MATLABAndGNURIntegrationWithVTK.html

You can look at the vtkRCalculatorFilter unit test to get some idea on
how this integration can be used..

http://vtk.org/gitweb?p=VTK.git;a=blob;f=Graphics/Testing/Cxx/TestRCalculatorFilter.cxx;h=1c7cfd4a63740c5a21e15b499dfe86c1da8d45f5;hb=HEAD

For hierarchical clustering, you can do something like ..

---------------------
calc->PutArray("0", "metabData");
calc->GetArray("height","height");
calc->GetArray("order","order");
calc->GetArray("merge","merge");
calc->SetRscript(QString(
                     "dEuc<-dist(t(metabData))\n"
                     "cluster<-hclust(dEuc,method=\"%1\")\n"
                     "height<-as.numeric(cluster$height)\n"
                     "order<-as.numeric(cluster$order)\n"
                     "merge<-as.numeric(cluster$merge)\n"
                     ).arg(hclust_method).toLatin1());
---------------------

and then parse the R outputs ( height, order, and merge ) to generate
a vtkMutableDirectedGraph that you can then visualize using
vtkGraphLayoutView.

HTH,
-Andinet


On Thu, Jun 9, 2011 at 7:43 PM, ankit lat <ankitlat at gmail.com> wrote:
> I am making a dendrogram using VTK. Can anyone suggest me the graph layout
> stratgies for this? Or if you can suggest some way to convert a tree to a
> dendrogram using vtk.
>
> Thanks
> Ankit lat
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
Andinet Enquobahrie, Ph.D.
Technical Lead
Kitware, Inc.

http://www.kitware.com
(919) 969-6990 x311



More information about the vtkusers mailing list