New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITKImageIO and ITKTransformIO not accessible within ITK #359

Open
dzenanz opened this Issue Jan 2, 2019 · 7 comments

Comments

Projects
None yet
4 participants
@dzenanz
Copy link
Member

dzenanz commented Jan 2, 2019

ITKImageIO and ITKTransformIO can be used by remote modules' examples only when the remote modules are being built externally. The remote modules cannot use ITKImageIO and ITKTransformIO when they are being built as part of ITK by enabling e.g. Module_Montage. This is a consequence of ITKImageIO and ITKTransformIO not being defined during module configuration step in ITK.

When this issue is fixed, the module template should be updated.

@thewtex

This comment has been minimized.

Copy link
Member

thewtex commented Jan 3, 2019

@dzenanz @jhlegarreta @fbudin69500 perhaps ITKImageIO, etc. should be defined here:

if(ITK_SOURCE_DIR)
# If configuration is done from within ITK,
# point to internal ITKConfig.cmake
set(ITK_DIR ${ITK_BINARY_DIR}/CMakeTmp)

What do you think?

@fbudin69500

This comment has been minimized.

Copy link
Contributor

fbudin69500 commented Jan 3, 2019

This would work for examples, but if we make the improvement to allow usage of ITKImageIO and ITKTransformIO inside the ITK build tree, wouldn't it make sense to allow it everywhere (especially for tests)?

@dzenanz

This comment has been minimized.

Copy link
Member

dzenanz commented Jan 3, 2019

Having it working for examples, but not tests is better than not working for either, which is the case now.

When writing a test the author knows which format is needed for IO, and can list that format explicitly. And that might be a better way too?

@jhlegarreta

This comment has been minimized.

Copy link
Member

jhlegarreta commented Jan 3, 2019

While the solution seems fair to me, @fbudin69500 's comment seems to be fair also. However, I ignore whether we are willing to list all components for every test and example, or whether that has bearings in the configuration time. That said, I ignore whether a better solution exists.

@thewtex

This comment has been minimized.

Copy link
Member

thewtex commented Jan 4, 2019

wouldn't it make sense to allow it everywhere (especially for tests)?

Implementation is a Catch 22 -- when processing the modules, the set constituting the ImageIO modules is not known until all the modules are processed.

@fbudin69500

This comment has been minimized.

Copy link
Contributor

fbudin69500 commented Jan 4, 2019

Good call. But in that case, wouldn't it be the same problem for examples? Are remote modules always processed last? What happens if a remote module implements a new IO?

@thewtex

This comment has been minimized.

Copy link
Member

thewtex commented Jan 6, 2019

Since the itk_module_examples() call comes after the module has been processed (it is placed at the end of the CMakeLists.txt after itk_module_impl(), the current module will have been processed.

In the case of building the module externally, all ITK IOs are already built.

In the case of a remote module build, if the module depends on ITKTestKernel (which most / all do or should), the image IO will already be there:

ITKIOBMP
ITKIOGDCM
ITKIOGIPL
ITKIOJPEG
ITKIOMeta
ITKIONIFTI
ITKIONRRD
ITKIOPNG
ITKIOTIFF
ITKIOVTK
ITKIOMesh

Transform IO will not necessarily, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment