[Insight-developers] itkVTKPolyDataReader.h reads ascii only --- why?

Alexandre GOUAILLARD agouaillard at gmail.com
Mon Oct 18 06:29:41 EDT 2010


hi wanlin.

I just reviewed your code.
Everything seems fine from this quick first review and I updated your
IJ paper with it.

It's a wonderful contribution, and I will put it as a candidate for
integration in itk v4.

Before I do that though, can you tell me more about PolylineCell ? The
code seems to be heavily inspired by the triangle cell, any specific
design point (or question) you would have before i go deeper into it?

Also, I will template your tests and examples over the meshtype to
reduce the number of lines by 2, unless you have strong objection
against it.

Finally, I don't understand the part on the third page about the data
type (pixeltype), could you point me to the example you are mentioning
in the paper?

thanks again for this contribution.

regards,

alex.


On Thu, Oct 14, 2010 at 12:19 PM, Alexandre GOUAILLARD
<agouaillard at gmail.com> wrote:
> hi wanlin, all,
>
> mesh IO is in my pile of to-be-reviewed. I m goign to put it on the
> top of my pile, and address it early next week. If everything goes
> alright, I would push the code in ITK v4 before the end of next week.
>
> thanks for the contribution.
>
> alex.
>
>
> On Thu, Oct 14, 2010 at 7:26 AM, wanlin <wanlinzhu at gmail.com> wrote:
>> Hi, Brain,
>>             Reading binary legacy vtk polydata has been implemented in
>> http://www.insight-journal.org/browse/publication/761
>> Would you like try it?
>>
>>
>>
>> On Wed, Oct 13, 2010 at 11:15 AM, Luis Ibanez <luis.ibanez at kitware.com>
>> wrote:
>>>
>>> Hi Brain,
>>>
>>> Since this is an existing class, Jeff could simply
>>>
>>> 1) create a Git branch in his local repository,
>>> 2) make the necessary changes to the class,
>>> 3) add the proper test for reading binary vtk files,
>>> 4) run Experimental build until green,
>>> 5) and then push the branch to Gerrit for review.
>>>
>>>
>>> Please let us now if you or Jeff run into any
>>> problems.
>>>
>>> I'm sure many people will appreciate having
>>> the binary read functionality in this reader.
>>>
>>>
>>>      Luis
>>>
>>>
>>> --------------------------------------------
>>> On Wed, Oct 13, 2010 at 5:00 PM, brian avants <stnava at gmail.com> wrote:
>>>>
>>>> Luis
>>>>
>>>> I think we can add the binary I/O capabilities to these classes, if
>>>> it's not done elsewhere, already.   Jeff Duda will probably do this
>>>> --- what's the recommended approach, currently, for adding
>>>> functionality like this to the toolkit?
>>>>
>>>> agreed that xml support is a bit ambitious.
>>>>
>>>> Brian
>>>>
>>>> On Wed, Oct 13, 2010 at 4:49 PM, Luis Ibanez <luis.ibanez at kitware.com>
>>>> wrote:
>>>> >
>>>> > Hi Brian,
>>>> >
>>>> > This reader was implemented as a helper class for
>>>> > other initiatives.
>>>> >
>>>> > Managing only ASCII was the first easy way to get
>>>> > it done.
>>>> >
>>>> > Binary just need to be added to its capabilities.
>>>> >
>>>> >
>>>> > Would you be interested in modifying the class
>>>> > and adding the Binary reading capability ?
>>>> >
>>>> >
>>>> > -
>>>> >
>>>> > The support for XML is a more difficult proposition.
>>>> > The implementation in VTK relies on a hierarchy
>>>> > of helper classes.  It can certainly be done in ITK
>>>> > but it will require several weeks of effort.
>>>> >
>>>> >
>>>> > I would suggest to deal only with the Binary
>>>> > reading capability initially.
>>>> >
>>>> >
>>>> >      Luis
>>>> >
>>>> >
>>>> > ----------------------------------------------------------------
>>>> > On Wed, Oct 13, 2010 at 2:38 PM, brian avants <stnava at gmail.com> wrote:
>>>> >>
>>>> >> Hi Everyone
>>>> >>
>>>> >> I updated git-itk this morning.  Am trying to read a vtk mesh and
>>>> >> apply a transformation to it.  I get the error below that says,
>>>> >> basically, "File format is BINARY but only ASCII files can be read".
>>>> >> Is there a good reason for this limitation?    Is it not true that vtk
>>>> >> files can be of type ASCII, binary or xml?   Should all of those be
>>>> >> supported?   Should the filter(s) be named
>>>> >> itkVTKAsciiPolyDataReader/Writer?    Finally, is anyone working on
>>>> >> this or is the solution in the software pipeline?
>>>> >>
>>>> >> Thanks!
>>>> >>
>>>> >> Brian
>>>> >>
>>>> >>
>>>> >> Input object: Mesh.vtk
>>>> >> Error during Update()
>>>> >>
>>>> >> itk::ExceptionObject (0x101abc640)
>>>> >> Location: "void itk::VTKPolyDataReader<TOutputMesh>::GenerateData()
>>>> >> [with TOutputMesh = itk::Mesh<double, 3u,
>>>> >> itk::DefaultStaticMeshTraits<double, 3u, 3u, float, float, double> >]"
>>>> >> File: /Users/brianavants/code/ITK/Code/IO/itkVTKPolyDataReader.txx
>>>> >> Line: 107
>>>> >> Description: itk::ERROR: VTKPolyDataReader(0x101abc4b0): Error reading
>>>> >> file: WM.vtk
>>>> >> File format is BINARY but only ASCII files can be read.
>>>> >> _______________________________________________
>>>> >> 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
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> ß®∫∆π
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>


More information about the Insight-developers mailing list