[vtkusers] WindowLevel Autobalance

John Fraser John.Fraser at icr.ac.uk
Mon Jun 28 08:47:09 EDT 2010


Hi Raul,

You could try using vtkImageAccumulator like this:

vtkImageAccumulate acc = new vtkImageAccumulate();
acc.SetInput(imageReader.GetOutput());
acc.Update();
double[] max = acc.GetMax();
double[] min = acc.GetMin();

John

>>> Raúl Ferriz <raul at torresyvalero.com> 28/06/2010 12:30:28 >>>

El 28/06/2010 12:31, Raúl Ferriz escribió:
> Is there an easy way to autobalance window-level on a dicom image?
>
> I have searched on vtk samples and google but I have not found how to 
> do this.
>
> I use an vtkImageViewer2 to display.
>
>
> Many thanks.
What I need exactly is the way to get minimum and maximum value of the 
input (imagedata). So I can manually compute and apply window level with 
this two values. But I don't know to get this two values. Any advice?

The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100628/892155fb/attachment.htm>


More information about the vtkusers mailing list