Hello Sandra,
I'm indeed not sure whether the lookup table property can handle rgba color
format. As I see you do not really need the alpha component, my suggestion to
you is to use the HSV color format provided by vtkLookupTable.
Try something like this:
vtkLookupTable* lut = vtkLookupTable::New();
lut->SetNumberofColors( 1024 ); // or any other value you like
lut->SetRange(0,1);
lut->SetValueRange(0,1);
lut->SetHueRange(0,1);
lut->SetSaturationRange(0,1);
lut->Build();
and set it to the data node property. As Caspar suggested the use color
property needs to be set to false. Do you use floating point images to map them
through the table?
Hope it will work!
Best regards
Sven
Von: Claudia Hänel [mailto:[email protected]]
Gesendet: Dienstag, 10. Mai 2011 15:47
An: Goch, Caspar Jonas
Cc: [email protected]; 'Scherer, Sandra'
Betreff: Re: [mitk-users] Using Lookup Table
Hi,
does it now work for you? There's a reported bug:
http://bugs.mitk.org/show_bug.cgi?id=5862
I would be glad if it is fixed. But so far the mitk::LookupTable won't work for
me either. If you're interested I can send you a workaround with VTK and ITK.
Regards,
Claudia
Zitat von "Goch, Caspar Jonas"
<[email protected]<mailto:[email protected]>>:
> Hi Sandra,
>
> you need to set the "use color" property to false. Additionally you
> should get a vtk error, as your number of table values and the actual
> number of colors in your table is mismatched.
>
> If you add
>
> nodeIntima->SetBoolProperty("use color", false);
>
> and
>
> vtkLUT->SetNumberOfTableValues( 3 );
>
> it should work.
>
> Hope this helps.
>
> Regards,
> Caspar
>
> -----Ursprüngliche Nachricht-----
> Von: Scherer, Sandra
> [mailto:[email protected]]<mailto:[mailto:[email protected]]>
> Gesendet: Montag, 2. Mai 2011 16:40
> An: [email protected]<mailto:[email protected]>
> Betreff: [mitk-users] Using Lookup Table
>
> Hi all,
>
> I try to use a defined lookup table for one special node with the
> following code:
>
> vtkLookupTable *vtkLUT = vtkLookupTable::New();
> vtkLUT->SetNumberOfTableValues( 2 );
> vtkLUT->SetRange(0.0, 1.0);
> vtkLUT->SetTableValue( 0, 1.0, 0.0, 0.0, 1);
> vtkLUT->SetTableValue( 1, 0.0, 1.0, 0.0, 1 );
> vtkLUT->SetTableValue( 2, 0.0, 0.0, 1.0, 1 );
> vtkLUT->Build();
>
> mitk::LookupTable::Pointer mitkLookupTable = mitk::LookupTable::New();
> mitkLookupTable->SetVtkLookupTable(vtkLUT);
> mitk::LookupTableProperty::Pointer LookupTableProp =
> mitk::LookupTableProperty::New( mitkLookupTable );
>
> nodeIntima->SetProperty( "LookupTable", LookupTableProp );
> nodeIntima->Update();
>
> Unfortunately not the defined colors are used. There are colors...has
> mitk Lookup Table defined default colors?
>
> Maybe one can help me.
>
> Thanks.
>
> Regards,
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> mitk-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> mitk-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users