[vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx
Bill Lorensen
bill.lorensen at gmail.com
Sat Mar 31 15:33:55 EDT 2018
Sounds like a good idea, but give me an example of a filename that
fails with the current example. I tried a file named Torso.new.vtp an
it was read fine.
Bill
On Sat, Mar 31, 2018 at 9:40 AM, Heller M.O. <M.O.Heller at soton.ac.uk> wrote:
> Dear all,
>
>
>
> I used the ReadAllPolyDataTypes.cxx example to create a little command-line
> tool for file conversion and noted that a small change may make the example
> code more robust against funny filenames i.e. filenames including multiple
> dots.
>
>
>
> I think it could help to make the example a tad more robust if
> line 70 of the ReadAllPolyDataTypes.cxx file was changed from:
>
>
>
> std::string extension =
> vtksys::SystemTools::GetFilenameExtension(std::string(fileName));
>
>
>
> to:
>
>
>
> std::string extension =
> vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName));
>
>
>
>
>
> It took me as an absolute Cxx idiot a while to figure out what the problem
> was and how to address it.
>
> (A similar change may also be useful for the ReadAllPolyDataTypesDemo.cxx
> example)
>
>
>
> Best wishes, Markus
>
>
>
> Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis
>
> www.sportsarthritisresearchuk.org
>
> -------------------------------------------------------------------
>
> Prof. Dr. Markus O. Heller
>
> Full Professor of Biomechanics
>
> University of Southampton
>
> Department of Mechanical Engineering
>
> Southampton
>
> SO17 1BJ
>
> United Kingdom
>
>
>
> Tel. : +44 (0) 23 8059 4909
>
> Fax : +44 (0) 23 8059 3016
>
> email: m.o.heller at soton.ac.uk
>
> -------------------------------------------------------------------
>
> 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland
>
> http://wcb2018.com
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
--
Unpaid intern in BillsParadise at noware dot com
More information about the vtkusers
mailing list