[Insight-developers] converting a byu-based vtkPolyData to QuadEdgeMesh: SetCell() not successful...
Alexandre GOUAILLARD
agouaillard at gmail.com
Wed Jun 23 11:45:48 EDT 2010
dear michel,
to be backward compatible with itk::Mesh API, we have an AddFace()
which takes the same arguments (list of points). It also checks that
everything is alright (points exists, surface is 2-manifold, and there
is enough space in the 1-ring of the nodes to insert a triangle).
Once everything is checked, it let AddFaceWithSecurePointList do the
job at the QE level. Namely, the points' 1-ring are reordered to
accomodate the new face and the links between opposite half edges and
halfedges and faces are populated nicely. An historical note here: it
used to be part of AddFace, but in was doing too many cheks in the
case where we were just copying a mesh (think about all the
QEmEshtoQEMesh filters that copy the input to the output first to be
const correct). This helped make the copy 50% faster.
Finally, when everything is set up at the QE level, there is an
AddFace method which takes an QEdge as argument that does the final
job of putting the face in the face container by calling the
superclass (itk::Mesh) function.
hope this helps.
alex.
On Tue, Jun 22, 2010 at 4:59 PM, Michel Audette
<michel.audette at kitware.com> wrote:
> Hi Alex,
>
> just wondering, but it seems that QuadEdgeMesh::AddFace can call
> AddFaceWithSecurePointList(), which in turn can call AddFace().
>
> Does that make sense? Is it possible that leads to the wrong number of
> faces?
>
> Best wishes,
>
> Michel
>
> On Tue, Jun 22, 2010 at 4:14 PM, Michel Audette <michel.audette at kitware.com>
> wrote:
>>
>> Hi again,
>>
>> There is also code for LaplaceBeltrami in Namic sandbox which must be
>> compiled. There is a txx and a .h file, so just including the .h will do it.
>>
>> Best wishes,
>>
>> Michel
>>
>> On Tue, Jun 22, 2010 at 4:12 PM, Michel Audette
>> <michel.audette at kitware.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> svn co https://www.kitware.com/svn/KWPublic/trunk/KWScene KWScene
>>>
>>> The example is contained in a VTK plugin in
>>> Source/Generators/ParaView/vtkITKLaplaceBeltramiFilter.*
>>>
>>> When this plugin loads into Paraview, if we input one of BYU files from
>>> the JHU_ATLAS directory (which you can get by building KWScene with
>>> USE_JHU_ATLAS_DATA turned ON), and selecting the LaplaceBeltramiFilter after
>>> one has loaded KWSMenuBar from KWSceneBuild directory (make sure to build
>>> with Shared_lib On) , the filter will crash as a result of not getting valid
>>> return from GetCell() from the itk::QuadEdgeMesh.
>>>
>>> That's where things stand right now. The SetCell views the mesh as
>>> non-QE, the third case in
>>> void QuadEdgeMesh< TPixel, VDimension, TTraits >
>>> ::SetCell( CellIdentifier cId, CellAutoPointer& cell ) .
>>>
>>> I look forward interacting with you towards a solution.
>>>
>>> Best wishes,
>>>
>>> Michel
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 22, 2010 at 4:02 PM, Michel Audette
>>> <michel.audette at kitware.com> wrote:
>>>>
>>>> Hi Alex,
>>>>
>>>> I'm trying to commit. I've not yet committed anything from this laptop,
>>>> so I'm working out the username and password. Stay tuned.
>>>>
>>>> Michel
>>>>
>>>> On Tue, Jun 22, 2010 at 3:58 PM, Alexandre GOUAILLARD
>>>> <agouaillard at gmail.com> wrote:
>>>>>
>>>>> hi michel,
>>>>>
>>>>> can you send the vtk file and the code that reproduce the bug.
>>>>>
>>>>> alex.
>>>>>
>>>>>
>>>>> On Tue, Jun 22, 2010 at 3:51 PM, Michel Audette
>>>>> <michel.audette at kitware.com> wrote:
>>>>> > Dear fellow developers,
>>>>> >
>>>>> > here at NAMIC Summer Project Week, my collaborator and I are finding
>>>>> > that
>>>>> > trying to read in a vtkPolyData from a BYU file, and converting it to
>>>>> > an
>>>>> > itk::QuadEdgeMesh based on vtkPolyDataToitkQuadEdgeMesh.cxx taken
>>>>> > from
>>>>> > InsightApplication, we don't get a pointer from GetCell() thereafter.
>>>>> >
>>>>> > There seems to be logic missing in itk::QuadEdgeMesh::SetCell() that
>>>>> > would
>>>>> > enable us to complete the conversion successfully.
>>>>> >
>>>>> > Best wishes,
>>>>> >
>>>>> > Michel
>>>>> >
>>>>> > --
>>>>> > Michel Audette, Ph.D.
>>>>> > R & D Engineer,
>>>>> > Kitware Inc.,
>>>>> > Chapel Hill, N.C.
>>>>> >
>>>>> >
>>>>> > _______________________________________________
>>>>> > 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://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-developers
>>>>> >
>>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Michel Audette, Ph.D.
>>>> R & D Engineer,
>>>> Kitware Inc.,
>>>> Chapel Hill, N.C.
>>>>
>>>
>>>
>>>
>>> --
>>> Michel Audette, Ph.D.
>>> R & D Engineer,
>>> Kitware Inc.,
>>> Chapel Hill, N.C.
>>>
>>
>>
>>
>> --
>> Michel Audette, Ph.D.
>> R & D Engineer,
>> Kitware Inc.,
>> Chapel Hill, N.C.
>>
>
>
>
> --
> Michel Audette, Ph.D.
> R & D Engineer,
> Kitware Inc.,
> Chapel Hill, N.C.
>
>
More information about the Insight-developers
mailing list