+ if( reader->GetLookupTable() )
+ {
+ //convert to color:
+ vtkImageMapToColors *map = vtkImageMapToColors::New ();
+ map->SetInput (reader->GetOutput());
+ map->SetLookupTable (reader->GetLookupTable());
+ map->SetOutputFormatToRGB();
+ viewer->SetInput ( map->GetOutput() );
+ map->Delete();
+ }
+ else
+ {
+ viewer->SetInput ( reader->GetOutput() );
+ }