[vtkusers] [Paraview] how to store label fields

Dominik Szczerba dominik at itis.ethz.ch
Thu Jul 2 09:41:22 EDT 2009


Berk,

Example data: http://otoro.itis.ethz.ch/~dominik/tmp/head_eye.vti

The data is point-centered. I was raising up a question if I should not
store my label fields (from segmentation) as cell centered StructureGrid
instead, because PV interpolates the colors regardless of the states of
'interpolate colors / Goraud/Flat'. But the PV-CVS is no longer
interpolating integer point data (still insensitive to the mentioned
states). So something changed (for good), I was asking what and why.

As to the contour filter - contouring such (point based) label field
results in an unstructured grid, so for arbitrary angles the voxel
structure is anyway lost, thus interpolation makes sense. If however
switched off it seems to correctly show (crippled) triangles.

However, converting point data to cell data on my label field above
results in interpolation again, that can not be switched off - probably
because some interpolation is used during the transfer. So something is
probably still not OK here.

So a bottom line: is it finally OK to store label fields as ImageData
(where only POINT_DATA is allowed) or do I take StructuredGrid instead
and store the labels explicitly as CELL_DATA?

regards,
Dominik

On Thu, 2009-07-02 at 09:09 -0400, Berk Geveci wrote:
> This confuses me. The slice filter (vtkCutter) is not supposed to
> interpolate any cell-centered data whether it is integer or double. To
> my knowledge, there has been no bug that changed this. Can you send me
> a small dataset that I can reproduce this with?
> 
> -berk
> 
> On Thu, Jul 2, 2009 at 8:12 AM, Dominik Szczerba<dominik at itis.ethz.ch> wrote:
> > I just checked that PV from CVS addresses exactly this issue, so I am
> > apparently not alone in my considerations. PV 3.4 will load a label
> > field and interpolate the colors when viewing slices (thus destroying
> > the image). PV CVS ignores interpolation settings and displays my labels
> > correctly (without interpolation). So I assume somebody realized the
> > problem recently too and corrected it. So I conclude that ImageData is
> > still the right choice for discrete label fields (and not
> > StructuredGrid), but one has to rely on the latest version. Please
> > correct me if I am wrong.
> >
> > -- Dominik
> >
> > On Wed, 2009-07-01 at 18:07 +0200, Dominik Szczerba wrote:
> >> When storing my label field as imagedata I get unwanted interpolation if
> >> I e.g. cut through the volume. Switching the interpolation off results
> >> in funny bad looking triangles. What's the best/intended/practiced way
> >> of storing (integer) label fields? Image data is point centered while
> >> label fields are clearly cell centered. As I see the only alternative is
> >> StructuredGrid, but functions like contouring or resampling require
> >> point data anyway. So what's better: store my labels as image (point)
> >> data and compromise display (unwanted interpolation) or go for
> >> structured grid and compromise size of the file and needed conversions
> >> to image data anyway?
> >>
> >> -- Dominik
> >>
> >> _______________________________________________
> >> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtkusers
> >>
> >
> > _______________________________________________
> > 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 vtkusers mailing list