Hi Claudia,

I don't see anything wrong in your code, actually.
Used this one recently with  success:


m_ResultNode->SetProperty("ScalarsRangeMinimum", 
mitk::FloatProperty::New(absoluteRange[0]));

m_ResultNode->SetProperty("ScalarsRangeMaximum", 
mitk::FloatProperty::New(absoluteRange[1]));

m_ResultNode->SetProperty("scalar visibility", mitk::BoolProperty::New(true));

m_ResultNode->SetProperty("color" , mitk::ColorProperty::New( 0.0f, 0.0f, 0.0f 
));

mitk::LookupTable::Pointer mitkLut = mitk::LookupTable::New();

vtkLookupTable* vtkLut = mitkLut->GetVtkLookupTable();

vtkLut->SetHueRange(0.6667, 0.0);

vtkLut->SetTableRange(absoluteRange[0],absoluteRange[1]);

vtkLut->SetNumberOfColors(255);

vtkLut->SetRampToLinear();

vtkLut->Build();

mitk::LookupTableProperty::Pointer mitkLutProp = 
mitk::LookupTableProperty::New();

mitkLutProp->SetLookupTable(mitkLut);

m_ResultNode->SetProperty( "LookupTable", mitkLutProp );



Maybe you are missing the "scalar visibility" property?



Regards,

Tobi



------------------------------------------------------------
Tobias Schwarz
DKFZ
German Cancer Research Center (Deutsches Krebsforschungszentrum)
Member of the Helmholtz Association
Division of Medical & Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg
Phone: 49-(0)6221-42-2353
Fax: 49-(0)6221-42-2345
E-Mail: [email protected]<mailto:[email protected]>
Web: 
http://www.dkfz.de/en/mbi/<https://dkfzowa0.dkfz-heidelberg.de/owa/redir.aspx?C=6ebb39f6c3b94e03a77eca6c5e2e87a9&URL=http%3a%2f%2fwww.dkfz.de%2fen%2fmbi%2f>
Confidentiality Note: This message is intended only for the use of the named 
recipient(s) and may obtain confidential and/or privileged information. If you 
are not the intended recipient, please contact the sender and delete the 
message. Any unauthorized use of the information contained in this message is 
prohibited.



________________________________
Von: Claudia Hänel [[email protected]]
Gesendet: Dienstag, 26. Oktober 2010 14:20
An: [email protected]
Betreff: [mitk-users] How to apply mitk::LookupTable

Hi,

I try to apply a transferfunction. I want to map my gray value image to colors. 
I tried:

        vtkLookupTable *vtkLUT = vtkLookupTable::New();
        vtkLUT->SetTableRange(image->GetScalarValueMin(), 
image->GetScalarValueMax());
        vtkLUT->SetHueRange(0.5,0.0);
        vtkLUT->SetNumberOfColors(64);
        vtkLUT->Build();

        mitk::LookupTable::Pointer mitkLUT = mitk::LookupTable::New();
        mitkLUT->SetVtkLookupTable(vtkLUT);
        mitkLUT->ChangeOpacityForAll(0.5);
        mitkLUT->Update();

        mitk::LookupTableProperty::Pointer mitkLUTProperty = 
mitk::LookupTableProperty::New(mitkLUT);

       activationNode->SetProperty("LookupTable", mitkLUTProperty);
       activationNode->SetData(image);
       activationNode->Update();

But all I see is still the gray value image. Can anyone tell me what's wrong?

Regards,
Claudia


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to