What is the relation between Window Level from vtkImageData and Window Level from vtkImageActor ?
vtkImageProperty class has 2 members:
double ColorWindow; double ColorLevel;
and they are initialized with 255 and 127.5 in constructor.
double dActorWindow = myImageActor->GetProperty()->GetColorWindow(); double dActorLevel = myImageActor->GetProperty()->GetColorLevel();
vtkImageData window level values are taken from DICOM tags.
Let say that I have a DICOM series that has 80 as window and 30 as level. The pipeline put the data from vtkImageData into vtkImageActor in order to display 2d image.
When I display the initial window level value, in order to display the original WL, for vtkImageActor window 255 I should display the value as 80, as vtkImageData said. When user change WL from the mouse, it change it on vtkImageActor. Let say that user increase with 5 window color. Because the vtkImageActor 255 means 80, when user increase vtkImageActor window color by 5, I display 85, right ? I hope you understand it:
vtkImageData window color: 80 -> vtkImageActor window color: 255 -> display: 80;
user increase vtkImageActor with 5.
vtkImageActor window color: 300 -> display: 85;
Well, I guess this approach is not correct, because with this calculation, when I have on my vtkImageActor W/L 400/50, my image looks more diffuse and darker like other 2d dicom viewers at the same WL. And I suspect that this calculation is wrong.
I can get here some image samples if need it.
My question is, how to convert correctly vtkImageActor window level regarding original vtkImageData ?