[vtkusers] Make Smooth Isosurfaces

Sanket Jain jainsanket1 at gmail.com
Fri Oct 30 16:51:57 EDT 2009


No the comsol file is not open format. You will require COMSOL software to
view it. Anyways, I will check the scalar values and then if the problem
still persists, i will update you with my work.

Sanket

On Fri, Oct 30, 2009 at 2:11 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> So, my guess is that there is something wrong in your conversion. Is
> the comsol file format an open format? Is there a description? If so,
> can you provide the comsol file you are trying to convert?
>
> Bill
>
> On Fri, Oct 30, 2009 at 1:22 PM, Sanket Jain <jainsanket1 at gmail.com>
> wrote:
> > Yes, I generated the isosurface in comsol. It looks smoother than in VTK.
> I
> > have attached an view for the isosurface. It looks similar when I rotate
> the
> > isosurface for different view.
> >
> > Sanket
> >
> > On Fri, Oct 30, 2009 at 12:13 PM, Bill Lorensen <bill.lorensen at gmail.com
> >
> > wrote:
> >>
> >> The file and data seem OK. I looked at it in paraview and I see the
> >> same sort of "rough" isosurfaces that you see.  Can you generate an
> >> isosurface in COMSOL for comparison?
> >>
> >> Bill
> >>
> >> On Fri, Oct 30, 2009 at 12:36 PM, Bill Lorensen <
> bill.lorensen at gmail.com>
> >> wrote:
> >> > If the outside of your mesh is a "box", that is all you will see.
> >> >
> >> > I'll take a look.
> >> >
> >> > Bill
> >> >
> >> > On Fri, Oct 30, 2009 at 12:27 PM, Sanket Jain <jainsanket1 at gmail.com>
> >> > wrote:
> >> >> When I open the unstructured grid file in paraview, I get a opaque
> >> >> border of
> >> >> my geometry. When I decrease the opacity, I just see a hollow box. I
> >> >> cannot
> >> >> see my mesh inside the box. I think there is some problem with the
> >> >> file. But
> >> >> I compared my file with the format for writing unstructured grid and
> it
> >> >> looks correct to me. Do you mind having a look at the file
> (attached)?
> >> >> I
> >> >> know this might be asking for too much help. I really appreciate your
> >> >> efforts to help me.
> >> >>
> >> >> Sanket
> >> >>
> >> >> On Fri, Oct 30, 2009 at 11:17 AM, Bill Lorensen
> >> >> <bill.lorensen at gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> I mean the unstructured grid (the geometry).
> >> >>>
> >> >>> On Fri, Oct 30, 2009 at 12:10 PM, Sanket Jain <
> jainsanket1 at gmail.com>
> >> >>> wrote:
> >> >>> > Ok. I will recheck my matlab program which writes the vtk file and
> >> >>> > get
> >> >>> > back
> >> >>> > to you.
> >> >>> >
> >> >>> > For Paraview, did you mean only the mesh points without the scalar
> >> >>> > values? I
> >> >>> > checked the unstructured grid with scalars on them. They look
> >> >>> > exactly
> >> >>> > the
> >> >>> > same as in my VTK code.
> >> >>> >
> >> >>> > Sanket
> >> >>> >
> >> >>> > On Fri, Oct 30, 2009 at 7:55 AM, Bill Lorensen
> >> >>> > <bill.lorensen at gmail.com>
> >> >>> > wrote:
> >> >>> >>
> >> >>> >> Perhaps your scalar values are not associated with the proper
> >> >>> >> points?
> >> >>> >> Have you looked at the original unstructured grid with paraview?
> >> >>> >>
> >> >>> >> On Thu, Oct 29, 2009 at 10:21 PM, Sanket Jain
> >> >>> >> <jainsanket1 at gmail.com>
> >> >>> >> wrote:
> >> >>> >> > Yes, I tried for number of isovalues. But all of them have
> >> >>> >> > similar
> >> >>> >> > characteristics. Is it anything to do with the vtk file being
> in
> >> >>> >> > unstructured grid rather than polygonal data? For the mesh, I
> >> >>> >> > imported
> >> >>> >> > from
> >> >>> >> > COMSOL, I cannot use polygonal data.
> >> >>> >> >
> >> >>> >> > Sanket Jain
> >> >>> >> > On Thu, Oct 29, 2009 at 6:33 PM, Bill Lorensen
> >> >>> >> > <bill.lorensen at gmail.com>
> >> >>> >> > wrote:
> >> >>> >> >>
> >> >>> >> >> It does look strange. Have you tried changing the isosurface
> >> >>> >> >> value?
> >> >>> >> >>
> >> >>> >> >> On Thu, Oct 29, 2009 at 5:44 PM, Sanket Jain
> >> >>> >> >> <jainsanket1 at gmail.com>
> >> >>> >> >> wrote:
> >> >>> >> >> > I have attached a snapshot of my viewer. The isosurface is
> >> >>> >> >> > predicting
> >> >>> >> >> > the
> >> >>> >> >> > volume activated during monopolar stimulation. So,
> >> >>> >> >> > theoretically
> >> >>> >> >> > you
> >> >>> >> >> > will
> >> >>> >> >> > expect a sphere at a particular iso value.
> >> >>> >> >> >
> >> >>> >> >> > I tried using vtkPolyDataNormals. The figure attached is the
> >> >>> >> >> > output
> >> >>> >> >> > after
> >> >>> >> >> > including this filter. But I still think this is not smooth.
> >> >>> >> >> >
> >> >>> >> >> > I verified by opening my vtk file in Paraview (with, Compute
> >> >>> >> >> > Normal
> >> >>> >> >> > ON).
> >> >>> >> >> > Even then i get the same kind of response. So, do you think
> >> >>> >> >> > this
> >> >>> >> >> > is
> >> >>> >> >> > the
> >> >>> >> >> > best
> >> >>> >> >> > i can get? Or there might be some problem in the vtk file
> >> >>> >> >> > which is
> >> >>> >> >> > exported
> >> >>> >> >> > from COMSOL (I verified it multiple times).
> >> >>> >> >> >
> >> >>> >> >> > Thank you,
> >> >>> >> >> >
> >> >>> >> >> > Sanket
> >> >>> >> >> >
> >> >>> >> >> > On Thu, Oct 29, 2009 at 4:01 PM, Bill Lorensen
> >> >>> >> >> > <bill.lorensen at gmail.com>
> >> >>> >> >> > wrote:
> >> >>> >> >> >>
> >> >>> >> >> >> Sorry, reading your e-mail in more detail. Are you
> generating
> >> >>> >> >> >> the
> >> >>> >> >> >> isosurfaces in vtk using vtkContourFIiter or some
> equivalent.
> >> >>> >> >> >> If
> >> >>> >> >> >> so,
> >> >>> >> >> >> you should run the output through vtkPolyDataNormals.
> >> >>> >> >> >>
> >> >>> >> >> >> On Thu, Oct 29, 2009 at 4:59 PM, Bill Lorensen
> >> >>> >> >> >> <bill.lorensen at gmail.com>
> >> >>> >> >> >> wrote:
> >> >>> >> >> >> > What do you mean by rough? Perhaps the faces are flat
> >> >>> >> >> >> > shaded?
> >> >>> >> >> >> > How
> >> >>> >> >> >> > are
> >> >>> >> >> >> > you displaying the model in vtk?
> >> >>> >> >> >> >
> >> >>> >> >> >> > Are your isosurfaces composed of only triangles? If so,
> did
> >> >>> >> >> >> > you
> >> >>> >> >> >> > provide surface normals at each point?
> >> >>> >> >> >> >
> >> >>> >> >> >> > On Thu, Oct 29, 2009 at 4:30 PM, Sanket Jain
> >> >>> >> >> >> > <jainsanket1 at gmail.com>
> >> >>> >> >> >> > wrote:
> >> >>> >> >> >> >> Hello Experts,
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> I have just started to use VTK to fulfill my
> visualization
> >> >>> >> >> >> >> needs.
> >> >>> >> >> >> >> I
> >> >>> >> >> >> >> am
> >> >>> >> >> >> >> trying out few fundamental steps which would be crucial
> >> >>> >> >> >> >> for my
> >> >>> >> >> >> >> future
> >> >>> >> >> >> >> development.
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> I exported an  Finite Element Model (FEM) from COMSOL
> and
> >> >>> >> >> >> >> wrote
> >> >>> >> >> >> >> it
> >> >>> >> >> >> >> as
> >> >>> >> >> >> >> vtk
> >> >>> >> >> >> >> unstructured grid in matlab (points, connections and
> >> >>> >> >> >> >> data). I
> >> >>> >> >> >> >> am
> >> >>> >> >> >> >> just
> >> >>> >> >> >> >> trying
> >> >>> >> >> >> >> to read my vtk file and trying to visualize the
> >> >>> >> >> >> >> isosurfaces at
> >> >>> >> >> >> >> some
> >> >>> >> >> >> >> value.
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> The problem is the isosurfaces are very rough even when
> I
> >> >>> >> >> >> >> increased
> >> >>> >> >> >> >> the
> >> >>> >> >> >> >> mesh
> >> >>> >> >> >> >> density in my COMSOL model. I tried to perform the same
> >> >>> >> >> >> >> task
> >> >>> >> >> >> >> in
> >> >>> >> >> >> >> paraview and
> >> >>> >> >> >> >> even there i saw the same problem.
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> Do you think that increasing the mesh density should
> solve
> >> >>> >> >> >> >> it?
> >> >>> >> >> >> >> I
> >> >>> >> >> >> >> cannot
> >> >>> >> >> >> >> increase the mesh density because of computational
> issues.
> >> >>> >> >> >> >> Any
> >> >>> >> >> >> >> ideas
> >> >>> >> >> >> >> on
> >> >>> >> >> >> >> this
> >> >>> >> >> >> >> problem will be appreciated.
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> Thank you,
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> Sanket Jain
> >> >>> >> >> >> >>
> >> >>> >> >> >> >> _______________________________________________
> >> >>> >> >> >> >> 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
> >> >>> >> >> >> >>
> >> >>> >> >> >> >>
> >> >>> >> >> >> >
> >> >>> >> >> >
> >> >>> >> >> >
> >> >>> >> >> >
> >> >>> >> >> > --
> >> >>> >> >> > Sanket Jain
> >> >>> >> >> >
> >> >>> >> >
> >> >>> >> >
> >> >>> >> >
> >> >>> >> > --
> >> >>> >> > Sanket Jain
> >> >>> >> >
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> > --
> >> >>> > Sanket Jain
> >> >>> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Sanket Jain
> >> >>
> >> >
> >
> >
> >
> > --
> > Sanket Jain
> >
>



-- 
Sanket Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091030/341ca0bd/attachment.htm>


More information about the vtkusers mailing list