[Paraview] Gradient of an image
David Doria
daviddoria at gmail.com
Wed Mar 2 18:56:51 EST 2011
On Wed, Mar 2, 2011 at 4:32 PM, Jérôme <jerome.velut at gmail.com> wrote:
> Hi David,
> I think that your image has a 3-components data array, such as RGB.
> ParaView "Gradient" filter is based on vtkImageGradient which expects
> a 1-component image. You can
> - convert your image in grey level with a third party software,
> - use the calculator to compute a norm of the input image,
> - enable the vtkImageMagnitude or vtkImageLuminance in ParaView (I
> already did it here: http://github.com/jeromevelut/Peavip, but it
> seems that vtkImageMagnitude needs some update...)
>
> HTH
> Jerome
>
>
Jerome,
That is great! Can you include it in the actual Paraview distribution?
FYI vtkImageMagnitude appears in the filters list, but vtkImageLuminance
seems to be absent. Also, when I run vtkImageMagnitude, I get:
Warning: In /home/doriad/src/ParaView/Servers/Filters/vtkTexturePainter.cxx,
line 179
vtkTexturePainter (0x8dee780): Failed to locate selected scalars. Will use
image scalars by default.
and then there is no output. The data is in an array called PNGImage of type
unsigned char with Data range [0,255],[0,255],[0,255].
Any thoughts? The file I'm trying it on is here:
http://daviddoria.com/Uploads/daveDepth.png if you want to try to reproduce.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110302/68395d2f/attachment.htm>
More information about the ParaView
mailing list