JC,

On Nov 14, 2016, at 2:30 PM, Jean-Christophe Fillion-Robin 
<jchris.filli...@kitware.com<mailto:jchris.filli...@kitware.com>> wrote:

Hi Brad,

> Make an explicit instantiation library with the ITK classes part of the 
> shared libraries' interfaces.

My understanding is that we have been working on this for the past year without 
much success. Getting this right across compiler is difficult and hard to 
maintain

It is a potential solutions for smaller projects which have a couple well 
defined ITK classes in the API. Yes is certainly is hard to maintain. SimpleITK 
did this and were are seeing some portabilities to this solution today. But 
SimpleITK’s motivation was for library size reduction and compilation 
efficiency.

This is why there is a additional suggestion of restoring ITK’s wrapping 
infrastructure to do explicit instantiation. With the terrific advancements of 
class_xml and the general infrastructure, it would be ideal to enable the 
option to instantiate the templated itk::Objects based on the CMake parameters 
used for languages wrapping. On a large scale I don’t see an alternative to 
automate the explicit instantiation.



Does Slicer use ITK objects any where in it’s public API’s?

Yes, in few places:


Do these really produce itk::Objects? Here is my quick view.

 Base/CLI/itkPluginUtilities.h

I see some template functions and an itk::ProcessObject in the interface. That 
does not look like the problematic pattern.

 Libs/vtkITK/*

The vtkITK infrastructure is an example of the proposed solution #4

 Libs/MRML/IDImageIO/*

This appears to be an ITK ImageIO Factory. This pattern should be correctly 
exports specified and not an issue with the templated ImageFileReader.

 Libs/MRML/Core/vtkITKTransformInverse.h

OK, this one could have issues ITK BSplines with ITK Images. Would need a close 
look.


I was hoping that after the ITK Transform factory most of the dynamic_cast 
issues would be gone. What is remaining?



Thanks
Jc


--
+1 919 869 8849

_______________________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-developers

Reply via email to