[Insight-users] Re: [Insight-developers] Mesh from binary mask options

Luis Ibanez luis.ibanez at kitware.com
Thu Aug 17 08:24:35 EDT 2006


Hi Richard,

Have you tried smoothing the ITK binary image mask
before passing it to a vtkImageData ?

You may want to try the itkAntiAliasImageFilter.
It will smooth the image and still guarantee that
the iso-contours are in the same pixels as they
were for the Binary Mask.

By passing a smoother isocontour you may have
better luck when decimating the surface.


    Regards,


       Luis


-----------------------
Richard Beare wrote:
> Hi,
> 
> I've been playing with FeatureEdgeSmoothing in
> vtkWindowedSincPolyDataFilter and setting a feature angle of around
> 140 degrees, but still tend to see the thin filaments I mentioned get
> broken. Now that I'm using the contour filter they are unbroken prior
> to smoothing. Is there any way to smooth while preserving topology?
> 
> Thanks
> 
> On 8/16/06, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
>>
>> Hi Richard,
>>
>> If you are already combining ITK and VTK, it will be much better
>> to convert your ITK binary mask to a vtkImageData and then use
>> the vtkContourFilter on it.
>>
>>
>> The vtkContourFilter is much better than the
>> itk::BinaryMask3DMeshSource.
>>
>>
>> You will find examples on how to convert itkImage to vtkImageData
>> in the InsightApplications/Auxiliary/vtk directory.
>>
>>
>> for example:
>>
>>       itkReadITKImage3DSegmentShowVTK.cxx
>>       itkReadITKImageSegmentShowVTK.cxx
>>       itkReadITKImageShowSplineVTK.cxx
>>       itkReadITKImageShowVTK.cxx
>>
>>
>>
>>     Regards,
>>
>>
>>
>>        Luis
>>
>>
>> -----------------------
>> Richard Beare wrote:
>> > Hi everyone,
>> >
>> > I'm using itk::BinaryMask3DMeshSource to create a mesh from a mask
>> > I've generated. I translate the resulting mesh to an stl file via
>> > itkMeshTovtkPolyData and vtkSTLWriter (and optionally
>> > vtkWindowedSincPolyDataFilter). Some of the masks I'm producing have
>> > quite fine structure - for example 1 voxel thick filaments. Naturally
>> > the mesh produced by the marching cubes algorithm does not include
>> > this sort of structure - the interpretation of such structures is
>> > application dependent. In my case I would like to have the filaments
>> > represented in the mesh as tubes. One hack that would achieve this is
>> > to resample the mask so that the filaments are no longer one pixel
>> > thick and apply the marching cubes as before. However I was wondering
>> > if there is any other approach. I'm not tied to stl, I just need
>> > something that can be imported by typical cad packages. In addition,
>> > if anyone can recommend a way of producing a nurbs based
>> > representation from (or instead of) the triangulation, I'd like to
>> > hear about it.
>> >
>> > Thanks.
>> > _______________________________________________
>> > Insight-developers mailing list
>> > Insight-developers at itk.org
>> > http://www.itk.org/mailman/listinfo/insight-developers
>> >
>> >
>>
>>
>>
> 
> 




More information about the Insight-users mailing list