Hi Noura,

It is not currently possible to change the property (such as "color") of a
single point. As a workaround, you could create a separate pointset for
each point.

Taylor

On Sat, Dec 20, 2014 at 12:00 PM, Noura Hamzé <[email protected]> wrote:

> 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
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to