-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't workingdependenciesIssues/requests related to a dependency packageIssues/requests related to a dependency package
Milestone
Description
Hi,
I have an issue while I am trying to get an average volume of 6 brains I have imaged.
I start with import and resize to the allen ccf:
python U:\magellanmapper\run.py --proc import_only -v --img "C:\Make_atlas\ANM39.tif"
python U:\magellanmapper\run.py --img "C:\Make_atlas\ANM36.tif" --proc transform --atlas_profile abaccfv3
Then I tried to run the group reg:
python U:\magellanmapper\run.py -v --register group --atlas_profile groupwise --img "C:\Make_atlas\ANM36" "C:\Make_atlas\ANM37" "C:\Make_atlas\ANM39"
My first issue is the assumption I have labels for one of the brains - line 1061 in register.py.
In my local copy I was trying to skip this and not crop in y.
I can get thru to line 1116:
transform_filter = elastix_img_filter.Execute()
And I get an error:
root - CRITICAL - Unhandled exception. Additional log saved to: C:\Users\moharb\AppData\Local\Temp\magellanmapper_error_varcqfqz.log
Traceback (most recent call last):
File "U:\magellanmapper\run.py", line 23, in <module>
load_env.main()
File "U:\magellanmapper\magmap\io\load_env.py", line 185, in main
launch_magmap()
File "U:\magellanmapper\magmap\io\load_env.py", line 138, in launch_magmap
cli.main()
File "U:\magellanmapper\magmap\io\cli.py", line 994, in main
process_tasks()
File "U:\magellanmapper\magmap\io\cli.py", line 877, in process_tasks
register.main()
File "U:\magellanmapper\magmap\atlas\register.py", line 2047, in main
register_group(
File "U:\magellanmapper\magmap\atlas\register.py", line 1129, in register_group
transform_filter = elastix_img_filter.Execute()
File "C:\Users\moharb\Miniconda3\envs\mag\lib\site-packages\SimpleITK\SimpleITK.py", line 7081, in Execute
return _SimpleITK.ElastixImageFilter_Execute(self)
RuntimeError: Exception thrown in SimpleITK ElastixImageFilter_Execute: Y:\SimpleElastix\Code\Elastix\src\sitkElastixImageFilterImpl.cxx:191:
sitk::ERROR: ElastixImageFilter does not support the combination of 4-dimensional 32-bit float fixed image and a 4-dimensional 32-bit float moving image.
I tried this minimal example:
vectorOfImages=sitk.VectorOfImage()
origin = None
spacing = None
for filename in l2:
reader = sitk.ImageFileReader()
reader.SetImageIO("TIFFImageIO")
reader.SetFileName(filename)
img = reader.Execute()
if origin is None:
origin = img.GetOrigin()
spacing = img.GetSpacing()
else:
img.SetOrigin(origin)
img.SetSpacing(spacing)
vectorOfImages.push_back(img[:300,:300,:300])
label4d=sitk.JoinSeries(vectorOfImages)
elastixImageFilter=sitk.ElastixImageFilter()
elastixImageFilter.SetFixedImage(label4d)
elastixImageFilter.SetMovingImage(label4d)
elastixImageFilter.SetParameterMap(sitk.GetDefaultParameterMap('groupwise'))
resultImage=elastixImageFilter.Execute()
Still get the same error.
Any idea what I have missing?
I found this issue, maybe could be related.
Thanks!
Boaz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdependenciesIssues/requests related to a dependency packageIssues/requests related to a dependency package