[vtkusers] How to visualize principal components on dataset
Dominik Szczerba
domi at vision.ee.ethz.ch
Sat Jan 6 06:40:52 EST 2007
If you have it under matlab you may try my matlab-vtk wiki and see your
data right from under matlab.
As to the example code, I just have none to do exactly what you want.
But having studied the numerous VTK examples you should be able to go as
follows: read the dataset, set up a render window, create a vtkCommand,
connect it to the interactor, in the command's Execute() method update
the contour's isovalue, update the filter and the mapper, dump a movie
frame. If what I wrote above sounds magic you will need to invest
several hours in VTK's basics before.
good luck
--DS
Arne Hansen wrote:
> Do you think you can show me an example of this?
> It would probably be best if i could save my matlab data in a vtk-file,
> and then load this.
> Do you think this is a good approach?
>
> Thank you
>
>
> 2007/1/4, Dominik Szczerba <domi at vision.ee.ethz.ch
> <mailto:domi at vision.ee.ethz.ch>>:
>
> Oh sure it is possible. You can animate the contour moving by changing
> the isovalue (dont forget to call Update() somewhere) and dumping movie
> frames (I recommend ffmpeg). Just read the relevant documentation
> (contour, movie writer). Alternatively, employ Paraview for fast
> results.
> --DS
>
> Arne Hansen wrote:
> > Well, yes i have distance maps. But my plan is to extract only a
> certain
> > level of this map ie. the zero levelset. This i can do in matlab.
> But I
> > want to do this for a series of levelsets, since i am varying the
> > principal modes.
> > So I actually need to find out how i can save like a series of 3D
> > frames, so that i can show an animation of these in VTK with an
> > isosurface. Is this possible?
> >
> > Thank you
> >
> > 2007/1/4, Dominik Szczerba < domi at vision.ee.ethz.ch
> <mailto:domi at vision.ee.ethz.ch>
> > <mailto:domi at vision.ee.ethz.ch <mailto:domi at vision.ee.ethz.ch>>>:
> >
> > So what is your data.
> > If you need to visualize different level sets of a distance
> map then a
> > few contourings will do.
> > --DS
> >
> > Arne Hansen wrote:
> > > Hello. I have binary shapes, which i have aligned and
> transformed into
> > > signed distance maps. I have then made a mean distance map, and
> > created
> > > a set of offset functions(offset from mean). Using these offset
> > > functions i made a Principal component analysis to capture
> > variation. My
> > > next task is to visualize my 3D meanshape in VTK, and its
> > > differentprincipal modes, where i multiply from 1 to 3 standard
> > devians
> > > on each mode, to see how the shape deforms.
> > >
> > >
> > > Can anybody give me a hint as of how to visualize this in VTK?
> > > Thank you very much :)
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ < http://www.vtk.org/Wiki/VTK_FAQ>
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
>
More information about the vtkusers
mailing list