Segmentation fault when resampling
felixS27 opened this issue · 5 comments
Hi!
First of all, I have never submitted an issue before, so I hope I am doing it right.
Second: Thanks for this nice module. It works perfectly for some small stitching jobs.
I am currently trying to stitch six tiles into one image with a mosaic form of 3x2. Up to the point setting up the itk.TileMergeImageFilter object and setting the input tiles everything is working fine. However, when I then execute .Update() on this object the script gets killed and I get the message Segmentation fault (core dump).
When I stitch only two or three tiles it works just fine. I only have the issue with six tiles.
I am working on Ubuntu 20.04.4 LTS, with 16 cores and 256 GB RAM. I am working with python 3.10.11 and itk 5.3.0 and its-montage 0.8.1
The image tiles are combined about 12GB in size.
I have absolutely no idea why I get this error message (by the way I also don't get any files or folders with some debugging info).
I hope you can help me in this case.
Thanks in advance.
Best,
Felix
Try creating TileConfiguration.txt
, then use it to invoke C++ example compiled in Debug
mode. If that works, we will know that problem is in Python wrapping. If it doesn't work, it might output some useful exception messages.
Hi,
thanks for your answer and sorry for my stupid follow up questions:
I only worked with Python and R before, so I don't have any experience in C++.
So do you mean I should rebuild the module following along option 3 on the installation section on the main GitHub page? If so? how can I enable the debug mode? And how should I then start the stitching?
Again sorry, but this is all new to me and I still try to learn.
Thank you.
Those examples are CMake-base projects, see instructions. To build them, you will need a built ITK (which is also a CMake-based project). During ITK configure step, enable option Module_Montage
. One you build everything, you will have a command line executable to which you pass a path to TileConfiguration.txt
Solved!!!!
But let me start from the beginning. I build everything you suggested and run RefineMontage on my TileConfiguration.txt file.
I got the following error message:
RefineMontage: /home/feschnei/ITK-build/ITK/Modules/Remote/Montage/include/itkTileConfiguration.h:227: void itk::TileConfiguration::Parse(const string&) [with unsigned int Dimension = 3; std::string = std::__cxx11::basic_string]: Assertion `Axis sizes: [3, 1, 1] current index: [0, 1, 0]. We have reached the end along axis 1
Index along axis 0 is 0, but it should be 2' failed.
Aborted (core dumped)
And this was my TileConfiguration file:
dim = 3
Tile_0.ome.tiff;;(0,0,0)
Tile_1.ome.tiff;;(2075.1,0,0)
Tile_2.ome.tiff;;(4151.6,0,0)
Tile_3.ome.tiff;;(4151.6,2067.8,0)
Tile_4.ome.tiff;;(2079.4,2069.2,0)
Tile_5.ome.tiff;;(0,2073.6,0)
For me it seems that the mosaic is not correctly determined. I never got this message, as I was not using a TileConfig file and directly fed the mosaic to itk.TileMontage
What I did now is that I changed my TileConfig file switched the order of the last three tiles so that it looks the following:
dim = 3
Tile_0.ome.tiff;;(0,0,0)
Tile_1.ome.tiff;;(2075.1,0,0)
Tile_2.ome.tiff;;(4151.6,0,0)
Tile_5.ome.tiff;;(0,2073.6,0)
Tile_4.ome.tiff;;(2079.4,2069.2,0)
Tile_3.ome.tiff;;(4151.6,2067.8,0)
And after changing that it worked. I also tested it then with the python version and it worked here too.
Thanks so much for your help!!!!
What would be the normal procedure here? Are you closing the issue or should I do it?
Thanks again for your time and help.
Usually, the reporter closes it.