[Insight-developers] [Insight-users] Run-time error in itkQuadEdgeMeshBorderTransform.txx

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Tue May 17 10:06:18 EDT 2011


Bernard,

You may want to keep this conversation on the list, some others may  
also be
interested !

On May 17, 2011, at 2:04 AM, Bernard Chiu wrote:

> Arnaud,
>
> Thank you for your help. I found out the reason why the code didn't
> work for me yesterday. I accidentally inputted a mesh with one
> triangle. When I really inputted the mushroom.vtk file you provided,
> it works.

Cool !!!

> However, I have a few concerns:
>
> (1) When I use the authalic map, I don't think I got an
> area-preserving mesh. Specifically, the area on the top of the
> mushroom seems very small and everything else appears extra large.

It is not globally authalic, but it is supposed to be locally  
authalic, i.e. the ratio
of the area of neighbors triangles is supposed to be maintained.

> (2) At the beginning, I inputted the mushroom mesh without PointData,
> the itkVTKPolyDataReader returns an error message. I added some random
> scalars to the mesh and it works.

Strange! Can you give me the error message, please?

> I am trying to extend your code so that I can use it in my project.
> And I would like to get your expert opinions on several issues:
>
> (1) In creating an area-preserving map for a number of carotid
> surfaces, I need to set a boundary that is not a convex polygon.

This kind of parameterization requires a mapping into a convex polygon,
so using a non convex polygon as boundary of the domain would create
inconsistencies (flipped triangles, or triangles out of the domain).

> Would
> it affect the performance of the code in terms of the area-preserving
> property of the parameterization? Also, how easy or difficult to
> derive a class to map on boundaries different from a disk and a
> square?

Making another border transform to any kind of convex polygon is not  
too complicated,
but that's not what you want.

In your case, you are interested in non linear methods which starts  
from a linear one
and with relaxation procedure minimize a functional. I can give you  
some reference
later.

These methods are not implemented in ITK. But if you want to go down  
that
road, if would make a terrific contribution to the Insight Journal !!!



> (2) What I have in mind is to flatten carotid surfaces of different
> subjects onto a standard map. Suppose I have a full set of
> correspondence between these surfaces, is it possible to add a
> functional to the existing one that minimizes the total distance
> between all correspondence pair in your code?

For mesh registration, people have been using parameterization to a  
convex polygon
cause it is easier to register one square to another one.

You can even consider using image registration to register both  
domain, if you associate
to each triangle values (note you can associate values to each vertex  
and do a linear
interpolation on each face).


> Thank you very much for your help again.
>
> Bernard
>
>
>
>
>
> On Mon, May 16, 2011 at 10:15 PM, Arnaud GELAS
> <arnaud_gelas at hms.harvard.edu> wrote:
>> Bernard,
>>
>> Have a look at the following example:
>> http://www.vtk.org/Wiki/ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter
>>
>> Best,
>> Arnaud
>>
>> On 05/16/2011 09:44 AM, Arnaud GELAS wrote:
>>>
>>> Hi Bernard,
>>>
>>> Are you using the code from the Insight Journal or the one from
>>> ITK/Code/Review ?
>>>
>>> You can find the code (all classes) of the insight journal in the  
>>> review
>>> directory, so you don't actually need the source from the insight
>>> journal anymore.
>>>
>>> Let us know if your problem persists!
>>>
>>> Arnaud
>>>
>>> Note: I'll write a wiki example to demonstrate the usage of these  
>>> classes.
>>>
>>>
>>> On 05/16/2011 06:40 AM, Bernard Chiu wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I am trying to use the code documented in an insight journal paper
>>>> "Parameterization of Discrete Surfaces" to do some surface  
>>>> flattening.
>>>> When I tested the code using the sample data "mushroom.vtk", a
>>>> run-time error occurred at QuadEdgeMeshBorderTransform<    
>>>> TInputMesh,
>>>> TOutputMesh>::ArcLengthSquareTransform( ) when the variable "list"
>>>> was being deleted. The error message was "Access violation reading
>>>> location xxx." From previous experience, I suspect this is a case
>>>> where something in the stack was incorrectly modified. I don't know
>>>> the code well enough to be able to fix the problem though. Would
>>>> anybody be able to help? I compiled both itk and the code  
>>>> provided by
>>>> the insight journal paper using MS visual C++ .NET 2003. The  
>>>> QuadEdge
>>>> mesh parameterization code I am using are all in the Code/Review
>>>> folder of itk 3.20. Therefore I think I am using the latest code.
>>>>
>>>> Thank you,
>>>> Bernard
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>



More information about the Insight-developers mailing list