[vtkusers] Pixel Value on Mouse Over with java
David Doria
daviddoria at gmail.com
Fri Nov 15 08:07:47 EST 2013
On Fri, Nov 15, 2013 at 3:16 AM, amal jerbi <am.jerbi at gmail.com> wrote:
> Hi,
>
> I want to pick the pixel value of an image i found this C++ example on net
>
> http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27
>
> but no idea how to write this code with java:
>
> unsigned short* pPix = (unsigned short*)pImageData->GetScalarPointer();
> unsigned short usPix = pPix[nVolIdx];
> FmtStr(m_strDetails, "Pixel val = [" << usPix << "] at index ["
> << nVolIdx << "], coordinates(" << ptMapped[0] << "," << ptMapped[1] <<
> ")");
>
> Indeed, with vtk wrapped java i dont find the method GetScalarPointer
>
> Best,
> Amal
Unfortunately I don't know how to do this, but when you figure it out,
I'd be great if you would add an example here:
http://www.vtk.org/Wiki/VTK/Examples/Java
David
More information about the vtkusers
mailing list