Dear All,

I need a help to change the color of some points in mitk::PointSet  
To this end, some search redirects me to use the EnhancedPointSetVtkMapper3D. I 
defined a mapper and assigned it to myPointSet (see code below), but i have no 
idea how to access the color property of a single point.


Here is a sample code where the color of all the points in myPointSet is red. 
Let say that i want to change the colors of some points which fullfill "some 
condition" to green


      mitk::DataStorage::Pointer myDataStorage = mitk::DataStorage::New();;
      mitk::PointSet::Pointer myPointSet = mitk::PointSet::New();
      mitk::DataNode::Pointer myPointSetNode = mitk::DataNode::New();
      mitk::EnhancedPointSetVtkMapper3D::Pointer mapper3D = 
mitk::EnhancedPointSetVtkMapper3D::New();

      myPointSet->SetMapper(mitk::BaseRenderer::Standard3D, mapper3D );
      myPointSet->SetProperty( "color", mitk::ColorProperty::New(1., 0., 0.) );
      myPointSetNode->SetData(myPointSet);
      myDataStorage->Add(myPointSetNode);


In other words, I'm trying  do sth like this :

      for (int i=0; i< myPointSet->GetSize(); i++)
        if(some condition)  
      myPointSet->GetPoint(i)->SetProperty( "color", 
mitk::ColorProperty::New(0., 1., 0.) );


Any suggestions please?

Thanks in advance,

Noura
                                          
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to