[ITK] How to avoid NIFTI header files from being installed?
Niels Dekker
niels-xtk at xs4all.nl
Tue Sep 19 06:16:07 EDT 2017
>> This #include "gifti_io.h" could be hidden by moving the include
>> statement
>> from "itkGiftiMeshIO.h" to "itkGiftiMeshIO.cxx". That could be done by
>> adding a "proxy mechanism" to itk::GiftiMeshIO, similar to what we
>> added to
>> itk::NiftiIO. Do you think that would be a good idea?
On 2017-09-18 17:09, Matt McCormick wrote:
> Yes, great idea :-)
Thanks for your encouragement, Matt :-) The approach for
itk::GiftiMeshIO could be very, very similar as for itk::NiftiIO, as I
committed at Modules/IO/NIFTI/include/itkNiftiImageIO.h and
Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:
https://github.com/Kitware/ITK/commit/940f68ec18b15e500cc22d8ddb1dbae34b66cb2f
However, I wouldn't like to have so much duplicate code. The amount of
code duplication could be reduced by replacing my 'NiftiImageHolder'
class by std::unique_ptr<NiftiImageProxy>. Is it OK to use
std::unique_ptr in the ITK code base? It's basically the most
lightweight smart pointer of the Standard C++ Library but I don't see it
being used by ITK.
Kind regards, Niels
--
Niels Dekker
Scientific programmer
LKEB, Leiden University Medical Center, Netherlands
More information about the Community
mailing list