[vtkusers] WindowLevel Autobalance

Eric E. Monson emonson at cs.duke.edu
Mon Jun 28 09:04:04 EDT 2010


Hey Raul,

You can also get the range of values directly from the array that holds the intensity of the image (I call it "Intensity" here):

double i_range[2];
ImageData->GetPointData()->GetArray("Intensity")->GetRange(i_range);

-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Jun 28, 2010, at 8:47 AM, John Fraser wrote:

> 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?
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100628/1c4beaf0/attachment.htm>


More information about the vtkusers mailing list