[Insight-developers] Compare text (vtk) files

Karthik Krishnan karthik.krishnan at kitware.com
Sun Jul 11 11:33:03 EDT 2010


You can use VTK to generate the hausdorff / mean surface distance between
the two surfaces and compare that with a threshold.

 foreach( point_in_mesh1 )
    {
    cellLocator->FindClosestPoint( point, closestPoint, cellId, subId,
distance);
    maxDistance = std::max( distance, maxDistance );
    meanDistance += distance;
    }

I don't think its possible if its an ITK test, but I wanted to throw it out
there anyway..

There is a point locator in ITK as well, maybe you could use that. I've
never used it.

thx
--
karthik

On Sun, Jul 11, 2010 at 8:51 PM, Dan Mueller <dan.muel at gmail.com> wrote:

> Hi Bill, that's a good idea! Thanks.
>
> On 11 July 2010 17:14, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> > You read the files and compare the # of polys, points, etc. to a
> > baseline. At least that will tell you if something major changed. You
> > might even be able to check the topology (face connectivity).
> >
> > Bill
> >
> > On Sun, Jul 11, 2010 at 11:05 AM, Dan Mueller <dan.muel at gmail.com>
> wrote:
> >> Thanks for your prompt responses! I made all the screenshots for the
> >> article using paraview :P
> >>
> >> I was looking for something a little more automated to validate the
> >> output. I mean, if I make a change to the code, the only way I can
> >> verify the change is to open the 20+ vtk output files one by one in
> >> paraview. That will have to do for now I guess.
> >>
> >> Regards, Dan
> >>
> >> On 11 July 2010 16:57, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> >>> You should at least see if it loads into paraview...
> >>>
> >>>
> >>> On Sun, Jul 11, 2010 at 10:53 AM, Dan Mueller <dan.muel at gmail.com>
> wrote:
> >>>> Fair enough.
> >>>>
> >>>> I see Testing/Review/itkVTKPolyDataWriterTest01 just writes a vtk file
> >>>> without validating the output either. I guess this is better than
> >>>> nothing, though the test could be writing complete garbage and still
> >>>> pass...
> >>>>
> >>>> Thanks. Dan.
> >>>>
> >>>> On 11 July 2010 16:40, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> >>>>> Not that I know of. Sounds difficult to me because of file formats
> >>>>> differences and floating point precision differences on different
> >>>>> platforms.
> >>>>>
> >>>>> Bill
> >>>>>
> >>>>> On Sun, Jul 11, 2010 at 10:29 AM, Dan Mueller <dan.muel at gmail.com>
> wrote:
> >>>>>> Hi Insight Developers,
> >>>>>>
> >>>>>> I am preparing a submission for the Insight Journal. My new filter
> >>>>>> itk::CuberilleImageToMeshFilter outputs mesh (vtk) files. I want to
> >>>>>> write some tests which compare the resultant text (vtk) files to
> >>>>>> baseline files.
> >>>>>>
> >>>>>> I know of the ImageCompare tool which can be used to compare output
> >>>>>> images to a baseline image. Is there a similar tool or CMake command
> >>>>>> to compare output text (vtk) files to a baseline text file?
> >>>>>>
> >>>>>> Thanks in advance.
> >>>>>>
> >>>>>> Regards, Dan
> >>
> >
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100711/6278a3f2/attachment.htm>


More information about the Insight-developers mailing list