[MINC-users] Surface Object Correction

Matthijs van Eede matthijs at mouseimaging.ca
Wed Apr 22 12:09:54 EDT 2015


Hi Raihaan,

This is a bit of a late reply, so probably this is more for future reference, but there is another way that might do what you want. There is a program that can convert mesh files between obj (BIC), stl, and vtk formats. By default the program runs a "clean" operation on the mesh which run:

vtkCleanPolyData()

According to the vtk documentation, this: "merge duplicate points, and/or remove unused points and/or remove degenerate cells". You need to have vtk installed which can be done using:

sudo apt-get install libvtk5-dev python-vtk

The program is here:

https://github.com/jan-scholz/minc-scripts

And you could run it like so:

vtk_meshconvert.py -i input_mesh.obj -o output_mesh_clean.obj
(alternatively convert to stl and open with blender)
vtk_meshconvert.py -i input_mesh.obj -o output_mesh_clean.stl

Cheers,
Matthijs


----- Original Message -----
From: "Raihaan Patel" <patelraihaan at gmail.com>
To: "MINC users mailing list" <minc-users at bic.mni.mcgill.ca>
Sent: Wednesday, March 25, 2015 12:20:27 PM
Subject: Re: [MINC-users] Surface Object Correction

Hi Alex and Simon,

Thank you both for your replies.

Alex - a quick look at the Meshlab docs looks promising and I will
certainly give it a try.

Simon - the object was created using a label.mnc file and Display, then
downsampled using Amira.
  1. Display label.mnc
  2. In Create Surface menu (G), use Volume Bin-Isosurf (S) to isolate ROI
and extract surface
  3. In Polygons menu (Z), perform one iteration of Smooth Polygon (C)
  4. Save as .obj file
  5. Downsampled the .obj file using Amira software, reducing the number of
faces

The downsampled .obj file is a triangular mesh.

Raihaan


On Wed, Mar 25, 2015 at 9:01 AM, Alex Zijdenbos <zijdenbos at gmail.com> wrote:

> Hi Raihaan,
>
> Agreeing with Simon - probably better to avoid these in the first place;
> but for editing meshes, you may want to take a look at Meshlab, it has a
> variety of options for cleaning/remeshing/etc.
>
> -- A
>
> On Wed, Mar 25, 2015 at 6:16 AM, Simon Eskildsen <eskild at gmail.com> wrote:
>
> > Hi Raihaan,
> >
> > What you're asking for is far from trivial. Can you provide more details?
> > How did you create the object - how did the intersections happen? Are we
> > talking about a triangular mesh?
> > In general, the best strategy is to prevent these unwanted features to
> > happen in the first place.
> >
> > Simon
> >
> > On Mon, Mar 23, 2015 at 3:33 PM, Raihaan Patel <patelraihaan at gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > I'm looking for any advice/input on correcting a surface object (.obj).
> > > Specifically, I am wondering how to:
> > >
> > > - remove/correct any intersecting faces
> > > - remove/correct any faces that have an area of 0
> > >
> > > Thanks very much,
> > > Raihaan
> > > _______________________________________________
> > > MINC-users at bic.mni.mcgill.ca
> > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> > >
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
> >
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
_______________________________________________
MINC-users at bic.mni.mcgill.ca
http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users


More information about the MINC-users mailing list