[ITK] How to avoid NIFTI header files from being installed?
Matt McCormick
matt.mccormick at kitware.com
Tue Sep 19 10:24:07 EDT 2017
On Tue, Sep 19, 2017 at 6:16 AM, Niels Dekker <niels-xtk at xs4all.nl> wrote:
>>> 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.
ITK currently supports compilers without C++11 availability, which is
why std::unique_ptr is not used. itk::AutoPointer could be used an
alternative:
https://itk.org/Doxygen/html/classitk_1_1AutoPointer.html
Thanks,
Matt
More information about the Community
mailing list