[vtkusers] Get pixel intensity
munarriz.a at gmail.com
Sun Jul 23 11:46:01 EDT 2006
Thanks, I'll keep your advice in mind.
On 22/07/2006, at 11:54AM, Cory Quammen wrote:
> Here's a simpler way to grab values from a vtkImageData object:
> vtkImageData *foo = ...;
> double scalar = foo->GetScalarComponentAsDouble(x, y, z, component);
> where component = 0 if you have just one scalar component in your
> It may be slow if you are looping through your entire image,
> though, so you may want to use the method described by Chase and
> Torsten. But if you want just one value or several values, the
> above works pretty well.
> Hi Andres,
> Here is one way to do it:
> vtkImageData *foo;
> int *dimensions = foo->GetDimensions();
> pixelValue =
> Anyone have a better way?
> Chase Yarbrough
> Andres Munarriz wrote:
> > Hi everyone,
> > I'm pretty sure someone has already posted a similar question if not
> > the same (for this I apologize), but I haven't been able to find
> > post. Is there a way to retrieve the pixel intensity at a
> > index from a vtkImageData object? Under ITK one can " make" the
> > then get the pixelData from it.
> > Thanks in advance,
> > Andres E. Munarriz Soto
> Cory Quammen
> University of North Carolina at Chapel Hill
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers