<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hi Raul,</DIV>
<DIV> </DIV>
<DIV>You could try using vtkImageAccumulator like this:</DIV>
<DIV> </DIV>
<DIV>vtkImageAccumulate acc = new vtkImageAccumulate();</DIV>
<DIV>acc.SetInput(imageReader.GetOutput());<BR>acc.Update();<BR>double[] max = acc.GetMax();</DIV>
<DIV>double[] min = acc.GetMin();</DIV>
<DIV> </DIV>
<DIV>John<BR><BR>>>> Raúl Ferriz <raul@torresyvalero.com> 28/06/2010 12:30:28 >>><BR></DIV>
<DIV style="COLOR: #000000">El 28/06/2010 12:31, Raúl Ferriz escribió:<BR>> Is there an easy way to autobalance window-level on a dicom image?<BR>><BR>> I have searched on vtk samples and google but I have not found how to <BR>> do this.<BR>><BR>> I use an vtkImageViewer2 to display.<BR>><BR>><BR>> Many thanks.<BR>What I need exactly is the way to get minimum and maximum value of the <BR>input (imagedata). So I can manually compute and apply window level with <BR>this two values. But I don't know to get this two values. Any advice?<BR><BR></DIV></BODY></HTML>