View Issue Details

IDProjectCategoryView StatusLast Update
0002900Slicer4Core: Base Codepublic2017-06-07 23:27
Reporterpieper Assigned Tojcfr  
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002900: cannot load volumes in release build of Slicer4 ITKv4
Description

It appears that none of the ITK ImageIO classes are added to the registry - only the slicer-specific ones.

Steps To Reproduce

Build slicer4 with ITK version set to 4 on windows VS 2008.

Try to load MR head or any other volume data. Load fails.

Additional Information

Other data types, like models, load fine.

TagsITKv4

Relationships

child of 0002884 closedjcfr Windows / ITKv4 - When building, it complains with "illegal parameter from the moc.exe" 

Activities

pieper

pieper

2013-01-29 10:41

administrator   ~0007764

To debug, I added the following debug code:

[2] ITKv4 ((c313377...) )$ git diff
diff --git a/Modules/IO/ImageBase/src/itkImageIOFactory.cxx b/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
index 4f7a101..edb3a2d 100644
--- a/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
+++ b/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
@@ -27,10 +27,16 @@ ImageIOFactory::CreateImageIO(const char
path, FileModeType mode)
std::list< ImageIOBase::Pointer > possibleImageIO;
std::list< LightObject::Pointer > allobjects =
ObjectFactoryBase::CreateAllInstance("itkImageIOBase");

  • std::cerr << "Classes: "
  • << allobjects.size()
  • << std::endl;
    for ( std::list< LightObject::Pointer >::iterator i = allobjects.begin();
    i != allobjects.end(); ++i )
    {
    ImageIOBase io = dynamic_cast< ImageIOBase >( i->GetPointer() );
  • std::cerr << "Testing: "
  • << ( *i )->GetNameOfClass()
  • << std::endl;
    if ( io )
    {
    possibleImageIO.push_back(io);

Then after trying to load a volume I get this in the error log:

Classes: 4
Testing: MGHImageIO
Testing: MRMLIDImageIO
Testing: AnalyzeImageIO
Testing: GE5ImageIO

So it appears that the ImageIO classes that slicer explicitly adds are available, but not the ITK default ones.

hjmjohnson

hjmjohnson

2013-01-29 11:08

developer   ~0007765

This code is to get you started:

https://github.com/Slicer/Slicer/tree/master/Libs/ITKFactoryRegistration

jcfr

jcfr

2013-01-30 12:01

administrator   ~0007766

Fixed in r21652
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21652

jcfr

jcfr

2014-03-06 04:53

administrator   ~0010769

Closing resolved issues that have not been updated in more than 3 months

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014662

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file caf73f8f

2013-01-30 17:00:44

jcfr

Details Diff
COMP: Ensure itkFactoryRegistration code is included when building against ITKv4

See http://www.na-mic.org/Bug/view.php?id=2900

Fixes 0002900

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21652 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Main.cxx Diff File
mod - Base/CLI/SEMCommandLineLibraryWrapper.cxx.in Diff File

Issue History

Date Modified Username Field Change
2013-01-29 10:39 pieper New Issue
2013-01-29 10:39 pieper Status new => assigned
2013-01-29 10:39 pieper Assigned To => pieper
2013-01-29 10:39 pieper Tag Attached: ITKv4
2013-01-29 10:39 pieper Relationship added child of 0002884
2013-01-29 10:41 pieper Note Added: 0007764
2013-01-29 11:08 hjmjohnson Note Added: 0007765
2013-01-30 11:17 jcfr Assigned To pieper => jcfr
2013-01-30 12:01 jcfr Note Added: 0007766
2013-01-30 12:01 jcfr Status assigned => resolved
2013-01-30 12:01 jcfr Fixed in Version => Slicer 4.3.0
2013-01-30 12:01 jcfr Resolution open => fixed
2014-03-06 04:53 jcfr Note Added: 0010769
2014-03-06 04:54 jcfr Status resolved => closed
2014-03-06 06:16 jcfr Target Version => Slicer 4.3.0
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file caf73f8f
2017-06-07 23:27 jcfr Note Added: 0014662