PlaceLandmarkGrid doesn't produce the grid

Hello I am using PlaceLandmarkGrid in Slicer Morph on Linux, version c944db9 (2025-06-26)

I tried to generate semi-landmarks on a grid from existing points, but instead of obtaining a grid containing the semi-landmarks as shown in the tutorial, I only ended up with gridPatch_0 groups without the expected grid.

screenshot as below

Is there anything in the error log? It is not possible to tell what the issue might be from these screenshots.

Is it working correctly with the sample data provided in the tutorial?

I tried example data, it still can’t

It is working for me with the sample data and tutorial. For the record, this is the tutorial I am using.

What is your Slicer version and your operating system?

I can attach the error log, I guess there are something

I am using archlinux and 5.8.1 slicer, I can’t find any error report are newly introduced when I used the module. Yeah, I am using this tutorail

But there are some related


AddNewNodeByClass: failed to create node by class vtkMRMLMarkupsGridSurfaceNode


Traceback (most recent call last):
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 324, in initializeInteractivePatch
    self.onSampleGrid()
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 275, in onSampleGrid
    self.patch.initializeGrid(gridResolution)
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 472, in initializeGrid
    self.gridNode.SetOutputSurfaceModelNodeID(self.gridModel.GetID())
AttributeError: 'NoneType' object has no attribute 'SetOutputSurfaceModelNodeID'
AddNewNodeByClass: failed to create node by class vtkMRMLMarkupsGridSurfaceNode


Traceback (most recent call last):
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 263, in onResampleGrid
    self.patch.initializeGrid(gridResolution)
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 472, in initializeGrid
    self.gridNode.SetOutputSurfaceModelNodeID(self.gridModel.GetID())
AttributeError: 'NoneType' object has no attribute 'SetOutputSurfaceModelNodeID'
Switch to module:  "Data"
Switch to module:  "PlaceLandmarkGrid"

Is this error message generated while using the tutorial with the provided mouse skull?

Because it is working for me on Linux with the 5.8.1 perfectly fine.

Yeah, it generate the same thing

Additionally information, when the software starts


Session start time .......: 20250909_130843
Slicer version ...........: 5.8.1-2025-03-02 (revision 33241 / 11eaf62) linux-amd64 - installed release
Operating system .........: Linux / 6.12.45-1-lts / #1 SMP PREEMPT_DYNAMIC Thu, 04 Sep 2025 17:54:55 +0000 / UTF-8 - 64-bit
Memory ...................: 15707 MB physical, 14999 MB virtual
CPU ......................: GenuineIntel Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz, 4 cores, 8 logical processors
VTK configuration ........: OpenGL2 rendering, TBB threading
Qt configuration .........: version 5.15.17, with SSL, requested OpenGL 3.2 (core profile)
DCMTK configuration ......: version 3.6.8, no SSL
Internationalization .....: disabled, language=
Developer mode ...........: disabled
Application path .........: /opt/3dslicer/bin
Additional module paths ..: /home/guoyi/.config/slicer.org/Extensions-33241/SegmentEditorExtraEffects/lib/Slicer-5.8/qt-loadable-modules, /home/guoyi/.config/slicer.org/Extensions-33241/SegmentEditorExtraEffects/lib/Slicer-5.8/qt-scripted-modules, /home/guoyi/.config/slicer.org/Extensions-33241/SurfaceMarkup/lib/Slicer-5.8/qt-loadable-modules, /home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules, /home/guoyi/.config/slicer.org/Extensions-33241/MarkupsToModel/lib/Slicer-5.8/qt-loadable-modules
  Error(s):
    Cannot load library /home/guoyi/.config/slicer.org/Extensions-33241/SurfaceMarkup/lib/Slicer-5.8/qt-loadable-modules/libqSlicerGridSurfaceMarkupsModule.so: (libarchive.so.19: cannot open shared object file: No such file or directory)
  Error(s):
    Cannot load library /home/guoyi/.config/slicer.org/Extensions-33241/MarkupsToModel/lib/Slicer-5.8/qt-loadable-modules/libqSlicerMarkupsToModelModule.so: (libarchive.so.19: cannot open shared object file: No such file or directory)
libpng warning: iCCP: profile 'ICC Profile': 'CMYK': invalid ICC profile color space
libarchive.so.19: cannot open shared object file: No such file or directory
Collecting mistune
  Using cached mistune-3.1.4-py3-none-any.whl.metadata (1.8 kB)
Requirement already satisfied: typing-extensions in /opt/3dslicer/lib/Python/lib/python3.9/site-packages (from mistune) (4.12.1)
Using cached mistune-3.1.4-py3-none-any.whl (53 kB)
Installing collected packages: mistune
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/3dslicer/lib/Python/lib/python3.9/site-packages/mistune'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/SlicerMorphTutorials.py", line 9, in <module>
    import mistune
ModuleNotFoundError: No module named 'mistune'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.9/imp.py", line 169, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 613, in _exec
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/SlicerMorphTutorials.py", line 11, in <module>
    slicer.util.pip_install('mistune')
  File "/opt/3dslicer/bin/Python/slicer/util.py", line 3942, in pip_install
    _executePythonModule("pip", args)
  File "/opt/3dslicer/bin/Python/slicer/util.py", line 3896, in _executePythonModule
    logProcessOutput(proc)
  File "/opt/3dslicer/bin/Python/slicer/util.py", line 3862, in logProcessOutput
    raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)
subprocess.CalledProcessError: Command '['/opt/3dslicer/bin/../bin/PythonSlicer', '-m', 'pip', 'install', 'mistune']' returned non-zero exit status 1.
loadSourceAsModule - Failed to load file "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/SlicerMorphTutorials.py"  as module "SlicerMorphTutorials" !
Fail to instantiate module  "SlicerMorphTutorials"
The following modules failed to be instantiated:
   SlicerMorphTutorials
Scripted subject hierarchy plugin registered: SegmentEditor
Scripted subject hierarchy plugin registered: SegmentStatistics
Switch to module:  "Welcome"
Scripted subject hierarchy plugin registered: FormatMarkups
Adding SlicerMorph Volume Rendering Presets

You have a bunch of errors, including not being able to load the SurfaceMarkups extension that PlaceGridLandmark tool requires.

Error(s): Cannot load library /home/guoyi/.config/slicer.org/Extensions-33241/SurfaceMarkup/lib/Slicer-5.8/qt-loadable-modules/libqSlicerGridSurfaceMarkupsModule.so: (libarchive.so.19: cannot open shared object file: No such file or directory) Error(s): Cannot load library /home/guoyi/.config/slicer.org/Extensions-33241/MarkupsToModel/lib/Slicer-5.8/qt-loadable-modules/libqSlicerMarkupsToModelModule.so: (libarchive.so.19: cannot open shared object file: No such file or directory) libpng warning: iCCP: profile ‘ICC Profile’: ‘CMYK’: invalid ICC profile color space libarchive.so.19: cannot open shared object file: No such file or directory Collecting mistune

I noticed that you have installed slicer to a location that might be read-only (/opt/slicer). I suggest trying to download and install slicer somewhere within your home directory (like your desktop) and retry.

I tried to use ln -s to solve .so problem, and it doesn’t report this error now, I think, it still has quite a lot of problems.

All I can say it works perfectly fine in ubuntu 24.04. I am not familiar with archlinux. But without the SurfaceMarkups extension working correctly, our tool will not work.

Also as I said, unless you install slicer to a folder where your account has write permission, things will continue not to work:

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/3dslicer/lib/Python/lib/python3.9/site-packages/mistune'

I gave that permission now… then error reports still


ReadDataInternal (vtkMRMLModelStorageNode2): File /home/guoyi/Downloads/PhD/wes/morphology/3ddata/Thersites.obj does not contain coordinate system information. Assuming LPS.


vtkMRMLMarkupsJsonIO::ReadFromFile: Error opening the file '/home/guoyi/Downloads/PhD/wes/morphology/3ddata/gridOutline_6.mrk.json'


vtkMRMLMarkupsJsonStorageNode::ReadDataInternal: Error: Error opening the file '/home/guoyi/Downloads/PhD/wes/morphology/3ddata/gridOutline_6.mrk.json'



vtkMRMLStorageNode::ReadData: Failed to read node gridOutline_6 (vtkMRMLMarkupsClosedCurveNode7) from filename='/home/guoyi/Downloads/PhD/wes/morphology/3ddata/gridOutline_6.mrk.json'


static void qSlicerIOManager::showLoadNodesResultDialog(bool, vtkMRMLMessageCollection*) Errors occurred while loading nodes: "Error: Loading /home/guoyi/Downloads/PhD/wes/morphology/3ddata/2025-09-08-Scene.mrml - ERROR: In vtkMRMLStorableNode.cxx, line 326\nvtkMRMLMarkupsClosedCurveNode (0x5ed9505485c0): vtkMRMLStorableNode::UpdateScene failed: Failed to read node gridOutline_6 (vtkMRMLMarkupsClosedCurveNode7) using storage node vtkMRMLMarkupsJsonStorageNode50.\n"
Switch to module:  "Data"
Switch to module:  "PlaceLandmarkGrid"
Generic Warning: In vtkProjectMarkupsCurvePointsFilter.cxx, line 208
No intersections found for 2 points for curve 


Generic Warning: In vtkProjectMarkupsCurvePointsFilter.cxx, line 208
No intersections found for 5 points for curve 


AddNewNodeByClass: failed to create node by class vtkMRMLMarkupsGridSurfaceNode


Traceback (most recent call last):
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 324, in initializeInteractivePatch
    self.onSampleGrid()
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 275, in onSampleGrid
    self.patch.initializeGrid(gridResolution)
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 472, in initializeGrid
    self.gridNode.SetOutputSurfaceModelNodeID(self.gridModel.GetID())
AttributeError: 'NoneType' object has no attribute 'SetOutputSurfaceModelNodeID'

Whenever, I tried to adjust the resolution for landmark grid, it reports


AddNewNodeByClass: failed to create node by class vtkMRMLMarkupsGridSurfaceNode


Traceback (most recent call last):
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 207, in onSampleRateChanged
    self.onResampleGrid()
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 263, in onResampleGrid
    self.patch.initializeGrid(gridResolution)
  File "/home/guoyi/.config/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/PlaceLandmarkGrid.py", line 472, in initializeGrid
    self.gridNode.SetOutputSurfaceModelNodeID(self.gridModel.GetID())
AttributeError: 'NoneType' object has no attribute 'SetOutputSurfaceModelNodeID'

I can see the problem is that the complied version based on source code has different behaviour with the pre-compiled version … again, similar to FIJI things. Thanks for your help @muratmaga

Looks like there is a library incompatibility. You have couple options

  1. You can try to build the Slicer from the source code locally with all the necessary extensions.
  2. You can try the latest preview build (recently Slicer build environment has been modified to support more recent linux environments and deal with ABI issues)
  3. Use ubuntu.

Thanks for your suggestions, I swtiched to the pre-compiled verrsion, then works well. However, I still have some questions. For example

semi-landmark distribute like this, it seeems look not bad, however it doesn’t match the surface of shell.

Could I get some suggestions?

I also found that inner surface may influence the landmark distribution, making it unreasonable

and with model, it looks like this, is any solution to manually adjust this situlation?

In this situation, you can manually adjust the middle blue points to create a spline. So for example the middle blue point between 1 and 2 can be moved to closer to your coil stitch. This will force all interpolated points to follow that spline.

The tool only generatea a rectangular patch initially (based on that four corner points and the underlying surface) If the surface has high complexity like yours, you will have to manually move those points for semi-landmarks to follow the surface more closely.

1 Like

Inner surface shouldn’t influence the landmark distribution. However they way you do the sequence of corner landmakrs, and the surface normals would. Sometime semilandmarks gets projected to the inner surface (if the surface normals are inverted or some other reason). If that’s the case simply hit the Flip Grid Orientation to corrrect it.

1 Like