[Paraview-developers] [Paraview] vtkImageData Plugin, vtkImageData not rendered

Joachim Pouderoux joachim.pouderoux at kitware.com
Mon Jan 9 13:39:53 EST 2017


Hi Gerald,

Not sure it is the only issue but please try giving a name to the output
scalar arrays.
ParaView won't make visible arrays which don't have a name.
Example:
  output->GetPointData()->GetScalars()->SetName("values");

Best,

*Joachim Pouderoux*, PhD

*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*


2017-01-09 5:20 GMT-04:00 Lodron, Gerald <Gerald.Lodron at joanneum.at>:

> Hi
>
> I programmed successfully a plugin source wich generates a vtkImageData
> output and made it the same way as on my 3d cloud plugins of vtkPolyData.
> The source is inherited from vtkImageAlgorithm and only contains one output
> with unsigned char array and one component.
>
> In the request data function of the filter I currently have a very dummy:
>
> output->SetDimensions(oData.imgSizeX, oData.imgSizeY, 1);
> output ->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
>  memcpy(output ->GetScalarPointer(), &oData.imgData[0], oData.imgSizeX*
> oData.imgSizeY*sizeof(unsigned char));
>
> in paraview I see in the information tab that  I have an uniform
> rectilinear grid with 1917201 cells and 1920000 points (image is
> 1600*1200px). In data Arrays I get an "ImageScalars" of unsigned char and a
> correct range of my memcopy data (my min max range is not 0,255 so data
> seems to be there)...
>
> the problem is that I cannot see anything in the render view, any
> suggestions what I am making wrong? I tested all representation (slice,
> surface, outline, on Solid Color and on my array), never see anything.....
>
> I also compared the Information tab on a loaded jpeg image and cannot see
> any difference (which is rendered in render view except the Array's string
> name), by the way: can I disable "MapScalars" by default?
>
> I am using pv5.2
>
> ------------------------------------------------------------
> ------------------------
> Gerald Lodron
>
> Researcher of Machine Vision Applications Group
> DIGITAL - Institute for Information and Communication Technologies
>
> JOANNEUM RESEARCH Forschungsgesellschaft mbH
> Steyrergasse 17, 8010 Graz, AUSTRIA
>
> phone:   +43-316-876-1751
> general fax: +43-316-876-1751
> web: http://www.joanneum.at/digital
> e-mail: gerald.lodron at joanneum.at
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170109/c002329c/attachment.html>


More information about the Paraview-developers mailing list