[Paraview] Gradient of an image

Jérôme jerome.velut at gmail.com
Thu Mar 3 15:43:01 EST 2011


David,
I just commited the ImageLuminance.xml in Peavip. I tried the
following pipeline with success :
Reader(daveDpeth.png) -> ImageLuminance -> Gradient

The error you get with ImageMagnitude is due to fact that some VTK
filter doesn't give a name to the output scalar. There is an old
thread on that topic -'cannot find it again, sorry-.

Finally, I won't ask to put Peavip in ParaView, as I don't think it
has sufficient quality, and enabling a lot of filters in the interface
is not a good idea. A third party GUI in which the user choose the
needed filters should be more suitable.

Jerome

2011/3/3 David Doria <daviddoria at gmail.com>:
> 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


More information about the ParaView mailing list