[Insight-users] Region color,,

Luis Ibanez luis.ibanez at kitware.com
Sat, 10 Apr 2004 17:33:54 -0400


Hi Yasser

Could you please make your question more explicit ?

 From your email it is not clear if you still have
a problem or not, and if so, what is what you want
to achieve and what are you obtaining as result
right now.


   Thanks


     Luis


----------------------
yasser salman wrote:

> hi Luis ,,  
> i segmented a region (tumor) from a series of Dicom
> slices using connected Theshold iler to colored
> (labeled) this region
>  in different color from the original volume i used a
> vtkimageblend (thanks luis) to represent the both
> segmented region with  Original volume at the same
> time
>  but when i used vtkImageMapToColors an error message
> said:
> 
> "  ERROR: In D:\Vtk\Imaging\vtkImageBlend.cxx, 
> line 932 vtkImageBlend (0803ADA0): Execute: input1
> ScalarType (5), must match output ScalarType (3)"
>  
> when i put DicomReader instead of *alpha it works well
> but at the same color of the original volume.., 
> 
> vtkLookupTable *hueLut1 = vtkLookupTable::New();
>     hueLut1->SetTableRange (0, 2000);
>     hueLut1->SetHueRange (0, 1);
>     hueLut1->SetSaturationRange (1, 1);
>     hueLut1->SetValueRange (1, 1);
> 	vtkImageMapToColors *alpha =
> vtkImageMapToColors::New();
>     alpha->SetInput(DicomReader->GetOutput());
> alpha->SetLookupTable(hueLut1);
> 
> 
> vtkImageBlend *blend=vtkImageBlend::New();
> blend-> SetInput(0,alpha->GetOutput());   
>  // when i put DicomReader instead of "alpha" it works
> well..,, but they renderef in the same color
> blend-> SetInput(1,SegmentedRegion->GetOutput());
> blend->SetOpacity(1,.7);
> 
> thanx luis,,
>