[Paraview] Saving image in VTK format

David E DeMarle dave.demarle at kitware.com
Tue Sep 21 17:10:59 EDT 2010


Extract Cells by Region produces the most generic type (unstructured
grid) because the region can potentially be arbitrary. An arbitrary
region can not by definition preserve the very regular structure
inherent in the image data type.

ExtractSubset produces i,j,k aligned subspaces, not arbitrary ones,
thus is can preserve the data type.

I can't guess why selection is not working on your copy of ParaView.
However, once working, you should be aware that selection produces
arbitrary subsets. However here there is a flag, at the VTK level at
least, which makes selection mark all cells/points as either in or
out. In that case it can preserve the data type but you still have to
apply a later filter (threshold for instance) to remove the excess,
and that filter will change the type. The selection mode flag, if
exposed in ParaView would be on the Selection Inspector panel.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Tue, Sep 21, 2010 at 4:58 PM, Sara Rolfe <smrolfe at u.washington.edu> wrote:
> Thanks for your reply!  I'm not having any trouble reading the original
> unstructured points as an image, but I didn't see why the data type was
> getting switched to an unstructured grid.
> Now I've realize this was done by ExtractCellsByRegion, which makes sense.
>  I switched to Extract Subset, which outputs structured points, and this
> works just fine.  However, the ROI selection is pretty limited since it only
> allows the selection using a cube, from what I can tell.  I've also tried
> Extract Selection, but Paraview crashes each time I try to use the selection
> tools.
> Any tips on a better way to do this would be appreciated!
> Sara
>
> On Sep 21, 2010, at 1:12 PM, Moreland, Kenneth wrote:
>
> VTK has a data type called structured grid that is different than image data
> (and also different than unstructured grid).  If ParaView is not telling you
> that your data is image data or a uniform grid, then the data you write out
> will be necessarily incompatible with reading it as an image file.
>
> -Ken
>
>
> On 9/21/10 11:55 AM, "Sara Rolfe" <smrolfe at u.washington.edu> wrote:
>
> Hello,
>
> I'm new to Paraview and am trying to use it to edit a VTK image.  My
> original image is in the structured points format.  I'm using the
> ExtractCellsByRegion filter to select a subset, which I save using
> Save Data with a VTK extension like the original.  However, I could
> not open this file using the ITK ImageFileReader.  I believe this is
> because the VTK file was saved as an unstructured grid instead of
> structured points.
>
> Does anyone know why this is happening and how to change it?  I can
> look at converting it using ITK, but I'd like to know if there's a
> better solution.
>
> Thanks,
> Sara
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list