Code Monkey home page Code Monkey logo

neurolabusc / surf-ice Goto Github PK

View Code? Open in Web Editor NEW
92.0 7.0 22.0 89.05 MB

GLSL surface rendering source code. Compiled versions available from NITRC. Loads 3DS, CTM, DXF, FreeSurfer, GII (GIfTI), GTS, LWO2, MS3D, MZ3, NV (BrainNetViewer), OBJ, OFF, PLY, STL, VTK. Tractography formats include BFloat, PDB, TCK, TRK, and VTK. Also NIfTI format voxelwise images.

Home Page: https://www.nitrc.org/plugins/mwiki/index.php/surfice:MainPage

License: BSD 2-Clause "Simplified" License

Batchfile 0.13% Shell 0.10% GLSL 5.73% Pascal 91.31% MATLAB 0.91% Python 1.24% JavaScript 0.26% HTML 0.26% Roff 0.02% C++ 0.01% Makefile 0.04%
visualization surface-rendering

surf-ice's People

Contributors

hanayik avatar neurolabusc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

surf-ice's Issues

Running surfice in environment without GUI

Good morning,

I'm trying to run Surfice with the command line in an environment that doesn't have an available display or GUI.
Are there any workarounds that I could use to make it work?

The problem of not having an available GUI is that even using the -S option, it stills opens up the Surfice GUI and runs the script in the interface.

Thank you very much for any help.

Create new atlas

I'm trying to create a new atlas based on the subcortical 3D volume from ENIGMA toolbox (sctx_lh.gii and sctx_rh.gii).
However, I was not able to do that. I would like to have the same functionality as AICHAhr.lh.mz3 from surfice.

Can anyone help me on how to do it?

bilateral mesh loading when hemisphere is chosen

Hi Chris,

From browsing your GitHub site, it looks like you may have seen this problem before:
A bilateral mesh loading when a hemisphere should be loading instead:

/Applications/Surfice/BrainNet/BrainMesh_ICBM152.lh.mz3
/Applications/Surfice/BrainNet/BrainMesh_ICBM152.mz3
/Applications/Surfice/BrainNet/BrainMesh_ICBM152.rh.mz3

Mac OSX Mojave 10.14.6
Surf Ice v1.0.20201102 64-bit x86-64 Cocoa LLVM

Interestingly, if I copy the hemisphere files to a different name and file folder, then they load correctly, at least for a while.
I am double-clicking the files to load them...but dragging the files onto surfice seems to result in the same problem.
Sorry, I don't know what to make of this. It is almost as if the surfice environment is changing depending on the sequence of files loaded beforehand??

Thanks for your time...I like the tool very much.

-Dianne

assign generated plot to variable | python

Hi Chris,

First of all, many thanks for developing Surf Ice! I'm using it all the time.

I'm currently trying to write a python script that generates the surface plots from different angles (medial, lateral) and for both hemispheres, and then combines them directly into one figure. Generating the plots for different angles and saving them with gl.savebmp in one script works fine for me, but I can't figure out how to assign the individual plots as subplots of a new figure (i.e., without saving them in an intermediate step). So far, I've used os.environ to see whether the generated image would be listed. So, my question is: how is the generated plot stored and is there a way I can retrieve it / assign it to a variable?

Many thanks in advance,
Ellen

"Unable to load overlay" fails somewhat silently depending on how error is caused

This may be intended behavior, but intuitively feels like an unintended inconsistency. When an overlay is loaded before a mesh has been loaded, a popup error message is raised ("Unable to load overlay: load background mesh first"). Yet, when an overlay fails to load because it does not exist, a message is printed in the Scripting output but does not raise a popup ("Unable to load overlay named ..."). This seems to be because the former error is raised by showmessageX in mesh.pas, whereas the latter is raised by GLForm1.ScriptOutputMemo.Lines.Add in commandsu.pas. Called as a script (e.g., \path\surfice.exe -S commands.txt), the former failure is effectively silent. It is possible this is because errors that occur through scripting are not intended to raise popups. However, intuitively, I would expect failure to load an overlay to have a consistent behavior, independent of the path to that error.

Pascal scripting interface does not work

I am not sure if this is a system/environment-dependent issue or an actual bug, but I thought I would report just in case. Pascal scripts that once worked in old versions of Surfice appear to no longer run in newer versions of Surfice. If I try to run even simple scripts like the following, nothing occurs:

BEGIN
resetdefaults;
meshload('BrainMesh_ICBM152_smoothed.lh.mz3')
END.

I tested on version 6-October-2021 on NITRC (as well as the Github copy). If I reinstall 2-November-2020, the scripts work fine (although the software itself suffers from issues that have since been addressed through 6-October-2021, so staying on the older version is not ideal).

Perhaps it is due to related to integration of PythonBridge or Python-for-Lazarus?

I am on macOS Big Sur 11.6.4.

request: set render/screenshot size from scripting

Feature request: it would be helpful to have a way to specify the size of the render window (and consequently, the size of SAVEBMP screenshots) via the scripting interface. If I need a script to create and save a render screenshot in a standard size, currently the best way I can find is to resize the window with the mouse, save screenshot, and check/iterate until I can find the desired size. This then cannot be reproduced later from scripting.

Thank you for your consideration!

README.md compile instructions are out of date

Trivial: The README.md compile instructions section is out of date and could be updated to list the python4lazarus_package dependency and where to find it.

I also discovered during my first compile that opts.inc reflects (I think?) options for surficeOld, rather than the default version. From examining _windows.bat I determined that I should replace this with a copy of optsCore.inc, and this solved the error "Program compile error (unspecified)" that I was getting with some of the shaders. It may be helpful for potential contributors to do some combination of a) make the checked-out opts.inc be that from optsCore.inc since this is the "main" version b) add more information to the error; something like: (e.g. "compile-time options prevent the use of this shader; try using surfice binary rather than surficeOld") c) mention the use/variants of opts.inc in the README.md.

These are simply suggestions/observations. I hope you find them helpful! I am not a pascal programmer, so some of this may be more obvious to someone who is.

Tracktion

Any idea how to use the tracktion script ?

Thanks a lot.

Cheers, Daniel

SurfIce cannot handle filepaths longer than 255 characters

This is perhaps less a bug and more an archaic path-length limitation (except maybe in Windows OS, where there is a similar value for the default MAX_PATH limitation). Using SurfIce 6-Oct-2021 on both macOS Monterey 12.5 21G72 and Ubuntu 22.04.1 LTS, I have found that SurfIce will raise an error if the length of a filepath is longer than 255 characters.

As a minimum reproducible example, I artificially renamed the built-in file "motor_4t95vol.nii.gz" to
"/home/blank/Downloads/folder_1/folder_2/folder_3/folder_4/folder_5/folder_6/folder_7/folder_8/folder_9/folder_10/folder_11/folder_12/folder_13/folder_14/folder_15/folder_16/folder_17/folder_18/folder_19/folder_20/motor_4t95vol_______________________.nii.gz" (255 characters), which loaded fine as an overlay in SurfIce. Adding an extra underscore brought the filepath to 256 characters, which fails with the following error message:

Could not open gzip compressed file /home/blank/Downloads/folder_1/folder_2/folder_3/folder_4/folder_5/folder_6/folder_7/folder_8/folder_9/folder_10/folder_11/folder_12/folder_13/folder_14/folder_15/folder_16/folder_17/folder_18/folder_19/folder_20/motor_4t95vol_______________________.nii.gz.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.

In neuroimaging data sets, files are sometimes deeply nested, for data provenance (e.g., per the BIDS specification), which can sometimes bring filepaths to longer than 255 characters. With SurfIce, this unexpectedly produces an error due to the path limitation. This can be circumvented by renaming or symbolic linking, but in case this is not intended behavior, I thought I would raise an issue.

visualizing multiple surfaces in the same scene

Hi,

Thanks for the cool tool! Ideally, I would load my surface a few times in different locations and orientations so that a single static image captured of my scene would show my annotations from a few perspectives with relatively full coverage of the surface. Would something like this be possible with scripting or existing functionality within the viewer?

Thanks!
Greg

Can't use Surfice

I recently installed the linux September 2019 release of Surfice to my university's HPC (Red Hat Enterprise Linux Server 7.7 (Maipo)). While I am able to use SurficeOld, I am unable to use Surfice. I realize this is related to the OpenGL version, which on our HPC is 2.1 Mesa 18.3.4. What I find strange though is that I installed the software to my personal Mac laptop (MacOS Sierra version 10.12.6) and even though the OpenGL is 2.1 INTEL-10.25.24 I am able to use Surfice there. I'm unsure if I'm properly checking the OpenGL version, and if there is a way to use Surfice on our HPC?

Thanks,

Dan

Compile error: aoScale is not defined when $IFDEF COREGL

This is a tiny bug that I presume was introduced in the last commit.

Compile Project, Mode: Default, Target: surfice.exe: Exit code 1, Errors: 7, Hints: 3
shaderu.pas(1040,3) Note: Local variable "lC" not used
shaderu.pas(1041,3) Note: Local variable "lLen" not used
shaderu.pas(1041,11) Note: Local variable "lN" not used
shaderu.pas(1315,2) Error: Identifier not found "aoScale"
shaderu.pas(1316,5) Error: Identifier not found "aoScale"
shaderu.pas(1317,4) Error: Identifier not found "aoScale"
shaderu.pas(1319,7) Error: Identifier not found "aoScale"
shaderu.pas(1319,18) Error: Identifier not found "aoScale"
shaderu.pas(1325,47) Error: Identifier not found "aoScale"
shaderu.pas(1329,48) Error: Identifier not found "aoScale"

I fixed it as attached, but I am not sure if this is the correct way per project and pascal style.

Issues when compiling again.

Hi, I remember we left this as "sometimes it builds, sometimes it doesn't". Which was fine since if I tried a few times, I would get it to build.

I am trying to install surf-ice on a new machine now, and I have tried to build it over 10 times. it keeps failing. Here's a sample error message.

Can you help me out?

.gii overview issue between CAT12 and surfice

Describe the bug
The CAT12 extension provides .gii for 'save cluster' function.

Although Surfice can overlay the .gii files automatically generated during statistical analysis (i.e. beta_0001.gii),
The clusterfile cause below error with proper vertex-numbered template (mesh.central.freesurfer.gii).

GIFTI overlay has a different number of vertices than the background mesh (1 vs 64984)

I tested with multiple dataset, but the results are always same.

Version
Surf Ice 1.0.20211212j 64-bit x86-64 Cocoa LLVM StaticPythonBridge
hw.model: MacBookPro16,2
Version 10.15.7 (Build 19H2026)
www.mricro.com :: BSD 2-Clause License (opensource.org/licenses/BSD-2-Clause)
PythonBridge
Scale 85.4112
Origin 0.6221x-18.1058x15.9966
Mesh Vertices 64984 Faces 129960 Colors 0
-67.0710..68.3152 -103.5170..67.3054 -45.5490..77.5422
Track Vertices 0 Faces 0 Count 0
Node Vertices 0 Faces 0
GPU Intel Inc. :: OpenGL 4.1 INTEL-14.7.28 :: GLSL 4.10

To Reproduce
Steps to reproduce the behavior:
Save any cluster from CAT12 statistics.
Open 'mesh.central.freesurfer.gii'
Add overlay the cluster .gii file, generated.

Cannot compile

I tried compiling your software on my system, and it fails with this log.

Basically what my system did here, is simply cd to the project root and run:

lazbuild -B --lazarusdir="/usr/share/lazarus/" surfice.lpi

Perhaps I am trying to compile the wrong project file?

python4lazarus dependency

I am trying to install the newest version: https://github.com/neurolabusc/surf-ice/archive/v1.0.20180622.tar.gz and I am getting the following build log:

�[32;01m * �[39;49;00mPackage:    sci-visualization/surf-ice-1.0.20180622
�[32;01m * �[39;49;00mRepository: local
�[32;01m * �[39;49;00mMaintainer: [email protected] [email protected]
�[32;01m * �[39;49;00mUSE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
�[32;01m * �[39;49;00mFEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking surf-ice-1.0.20180622.tar.gz to /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work
>>> Source unpacked in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work
>>> Preparing source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
SetupCompilerFilename: Searching compiler ...
SearchCompilerCandidates Value=fpc File=/usr/bin/fpc
Hint: (lazarus) [RunTool] /usr/bin/fpc "-iWTOTP"
Hint: (lazarus) [RunTool] /usr/bin/fpc "-va" "compilertest.pas"
SetupCompilerFilename: using /usr/bin/fpc
Hint: (lazarus) storing Lazarus directory "/usr/share/lazarus/" Compiler path "/usr/bin/fpc" in "/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/homedir/.lazarus/environmentoptions.xml"
Error: (lazbuild) Broken dependency: python4lazarus_package
 �[31;01m*�[0m ERROR: sci-visualization/surf-ice-1.0.20180622::local failed (compile phase):
 �[31;01m*�[0m   (no error message)
 �[31;01m*�[0m 
 �[31;01m*�[0m Call stack:
 �[31;01m*�[0m     ebuild.sh, line 124:  Called src_compile
 �[31;01m*�[0m   environment, line 2203:  Called die
 �[31;01m*�[0m The specific snippet of code:
 �[31;01m*�[0m       lazbuild -B --lazarusdir="/usr/share/lazarus/" surfice.lpi || die
 �[31;01m*�[0m 
 �[31;01m*�[0m If you need support, post the output of `emerge --info '=sci-visualization/surf-ice-1.0.20180622::local'`,
 �[31;01m*�[0m the complete build log and the output of `emerge -pqv '=sci-visualization/surf-ice-1.0.20180622::local'`.
 �[31;01m*�[0m The complete build log is located at '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/temp/build.log'.
 �[31;01m*�[0m The ebuild environment file is located at '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/temp/environment'.
 �[31;01m*�[0m Working directory: '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622'
 �[31;01m*�[0m S: '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622'

I guess I need and am missing the python4lazarus_package. I'm lookig to package it for Gentoo so that the dependency can be handled automatically, but I'm not sure where the source code is located. Is it here?

Overlay color selection

Daniel Leopold requested a method to customize color schemes. The latest release (v1.0.20201102 ) provides two methods:

Method 1: specify dark and bright red/green/blue colors, e.g. here Overlay 1 will. have colors from purple (255,0,255) to lime green (128,255,128):


import gl
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95vol.nii.gz')
gl.overlaycolor(1,255,0,255,128,255,128)

Method 2: Generate a new color lookup table - these are simply text files. Hint: if you put this text file inside the Resources/LUT folder, it will be in the pull-down menu when you restart (on MacOS, you need to. “Show Package Contents” to see the Resources folder):

import gl
import os
fnm = os.path.expanduser("~")+os.path.sep+'myLUT.clut';
f = open(fnm, "w")
f.write("[INT]\n")
f.write("numnodes=3\n")
f.write("[BYT]\n")
f.write("nodeintensity0=0\n")
f.write("nodeintensity1=128\n")
f.write("nodeintensity2=255\n")
f.write("[RGBA255]\n")
f.write("nodergba0=0|0|0|0\n")
f.write("nodergba1=128|128|0|64\n")
f.write("nodergba2=255|0|0|128\n")
f.close()
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95vol.nii.gz')
gl.overlaycolorname(1,fnm)

Can we use python3 on Mac?

Dear Chris,

I am trying to use Surfice with Python3 on a Mac. I set up a Python3 Conda environment. I tried pointing the surfice.ini (in /Users/dpat/Library/Application Support/surfice) to my Conda Python3 installation, but Surfice scripts failed when they started up.

Is there anything I can do to use Python 3 for scripting Surfice on Mac?

X-Ray feature doesn't reveal subcortical structure

Using the newest version of surf-ice, I've loaded the mni152_209.curv file, and overlaid a NIFTI file containing an subcortical ROI that I eroded. I tried following these steps to better show the subcortical structure, but all it does is adjust the dimness of both files, such that it never reveals the subcortical structure unless I adjust the depth slider. So far, I haven't been able to use the X-ray slider as specified in the documentation.

Scripting: Save multiple views in a single png file

Hi Surf Ice Team,

Is it possible to script different views of two activation maps overlaid on a template (e.g. the lateral, medial and superior views) and save the views in a single figure (.png file)? I would like to create images similar to the ones in BrainNet Viewer combining different views but having two activations maps.

So far, I have tried the following code, but I end up seeing only the medial view:

import gl
gl.resetdefaults()
gl.azimuthelevation(270, 0)
gl.meshload('BrainMesh_ICBM152.lh.mz3')
gl.overlayload('path_to_activationmap1/spmT_0016.nii')
gl.overlayminmax(1,2,12)
gl.overlayload('path_to_activationmap2/spmT_0017.nii')
gl.overlayminmax(2,2,5)
gl.colorbarvisible(1)
gl.hemispheredistance(0.62)
gl.azimuthelevation(90,0)
gl.savebmp('path_to_targetdir/Figure_test.png')

I am running Surf Ice 1.0.20211006+ 64-bit x86-64 Cocoa LLVM StaticPythonBridge on macOS Monterey Version 12.3.1

Please let me know if you need further information from me. Thank you very much in advance for your help!

Best regards,
Lya Paas

CLI way of converting volumetric images to mesh

Surf-ice has become my go-to program for converting volumetric images to meshes. This is mainly because I generally need 1-layer detection, and the more advanced features offered by bulkier and less trivial-to-compile packages such as iso2mesh are irrelevant for my purposes.

I'd like, however, to be able to access this feature from the CLI. This is not just for conveninence, but also because sometimes determining the ideal parameters for conversion is a matter of trial and error - which can sometimes border on unfeasible without batch mode.

Is there any way to do this?

Change the color scale

Hi,
Thanks for the interesting tool.
I'm using Surf-ice v1.0.20201102 on Linux. I would change the color map scale by using a log scale for that.
I'm wondering if there is such a possibility?

Thanks.

Access denied to node data

Hi

I get an "Access denied - risk of corruption" error when I import a brainnetviewer node file. I use the windows version.
The node file should be ok, since I manage to open it in MriCroS (and brainnetviewer itself).

thanks!

OpenGL issue

I downloaded the linux compiled release of surfice and on start got the following error message:

Unable to load OpenGL 3.3 found 3.3 (Core Profile) Mesa 12.0.6. Vendor Intel Open Source Technology Center. GLSL 3.30

I am on Ubuntu 16.04 on a laptop with onboard graphics.
This is my glxinfo output

Finding Centroids

Braden Yang requested a method to find representative vertices for a mesh. This centroid must be an existing vertex (for a watertight cigar shape, we want a vertex on the surface of the object, not inside). The latest release (v1.0.20201102). The new atlas2node() function supports this operation, creating a text file in BrainNet Viewer Node format which Surfice can open with the Nodes menu.

Details regarding the motivation, implementation and corner cases are described here (see PDF) by Daniel Glen (@afni-dglen), Meghan Robinson, and Chris Rorden (@neurolabusc).

  1. For watertight meshes, the centroid vertex is the one closest to the center of gravity for all the nodes. Note for some objects like a sphere, the choice is arbitrary.
  2. For non-watertight meshes, the vertex that is the furthest from any edge (in Euclidean space) is selected. In the case of ties, the vertex closest to the center of gravity for all vertices is selected. The analogy here is to consider the mesh like an island, where the beach represents the edge of the mesh. The representative vertex is the one furthest away (as the crow flies) from any beach.

Here is a simple script to illustrate how this finds nice centroids for the included boggle atlas:

import gl
import os
gl.resetdefaults()
gl.meshload('lh.pial')
gl.overlayload('boggle.lh.annot')
fnm = os.path.expanduser("~")+os.path.sep+'myBoggle.node';
if os.path.exists(fnm):
    os.remove(fnm)
gl.atlas2node(fnm)

boggle

Here is a simple script to illustrate how this finds nice a reasonable centroids for the challenging dumbbell shape of the precuneus. It should be noted that Surfice will append nodes to existing files (allowing a script to iteratively combine lots of different regions). Therefore, in some cases it is worth deleting an existing file to restart acquiring nodes. In addition, note that by default Surfice will load BOTH the left and right hemisphere for mesh pairs with LH. and RH. filenames. Be aware that some tools (AFNI, FreeSurfer) will change the coordinates of a hemisphere as they are inflated (to the point where a spherical left hemisphere and right hemisphere have the same center origin: 0,0,0). The Surfice function meshloadbilateral can be used to enable and disable the loading of bilateral hemispheres. It might be worth disabling this feature when using the atlas2node() function.

import gl
import os
gl.resetdefaults()
#show only left hemisphere
gl.meshhemisphere(-1)
gl.meshload('lh.inflated.DK.precuneus.mz3')
fnm = os.path.expanduser("~")+os.path.sep+'myPrecuneus.node';
if os.path.exists(fnm):
    os.remove(fnm)
gl.atlas2node(fnm)

precuneus

issue with MacOS Monterey 12.5

Hello! I really enjoyed working with surf-ice and the rich texture library it provides is always satisfying.

However recently after i updated my Mac system to Monterey 12.5 (from Big Sur), the python scripts is not working anymore. The error msg shows couldnt find python interpreter.

Due to the fact macos Monterey removed default system python2.7(There's no Framework anymore, see here, I've tried to change default python lib path in preference *.ini file to my anaconda python '~/anaconda3/lib/libpython3.8.dylib'. but it crashed immediately after running python code in scripts. Is that a problem cuz by no permission for anaconda lib?

now im wondering what could be done to fix the issue.
Thank you.

Yoking images

Feature request: when multiple instances of Surf Ice are running, allow the user to yoke the views so they show the same rotation (similar to MRIcroGL's Display/Yoke option).

Issue loading surficeOld

I was using surficeOld this morning with no issues; however, when I tried loading it this afternoon, I've been receiving this error message:

/N/u/dlevitas/Carbonate/.surficeOld/surficeOld.ini
OpenGL 2.1 with 8/8/8/24 bits of R/G/B/Dpth required. Use glxinfo to test capabilities.
/geode2/home/u020/dlevitas/Carbonate/Surf_Ice/BrainNet/BrainMesh_ICBM152_smoothed.lh.mz3 LH /geode2/home/u020/dlevitas/Carbonate/Surf_Ice/BrainNet/BrainMesh_ICBM152_smoothed.lh.mz3 RH /geode2/home/u020/dlevitas/Carbonate/Surf_Ice/BrainNet/BrainMesh_ICBM152_smoothed.rh.mz3

(surficeOld:30058): GLib-GObject-WARNING **: 14:36:22.227: cannot register existing type 'GdkScreen'

(surficeOld:30058): GLib-CRITICAL **: 14:36:22.227: g_once_init_leave: assertion 'result != 0' failed

(surficeOld:30058): Gdk-CRITICAL **: 14:36:22.228: IA__gdk_screen_get_primary_monitor: assertion 'GDK_IS_SCREEN (screen)' failed

(surficeOld:30058): Gtk-WARNING **: 14:36:22.249: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 0
xrandr : /bin/xrandr
VNC-0 connected 1366x768+0+0 0mm x 0mm
Scale factor:  1.000000000E+00

I also tried MESA_GL_VERSION_OVERRIDE=3.3 surfice, but this produced the same error. I don't recall changing anything of note on my institutions HPC user account, so I'm unsure why I can no longer seem to access the surficeOld GUI.

Feature request: Gentler mesh smoothing

Hi,

I really enjoy using Surfice, and the scripting tool is really convenient.

However, I am using the advanced tool meshcreate to generate mesh files from .nii files, and the smoothing is way too aggressive for my purpose as it erodes a lot of features, even relatively big ones.

Would it be possible to add a parameter to the smoothing method so that it is more or less harsh?

Thank you and keep up the good work!
Victor

Problem loading GIFTI surface

Hi Chris,

Surf-Ice seems to be having some trouble with a particular type of GIFTI surface (left_subthalamic_nucleus.gii.txt - added .txt so github would accept it):

left_subthalamic_nucleus

The triangle winding order is clockwise, although I don't thiink this is the cause of the problem.

The vertices and triangles in this file are encoded in plain text, rather than the more common base64, e.g.:

<Data> -6.549202 -11.776001  -9.900600
 -6.357399 -12.049004  -9.717800
...
-12.818001 -12.528999  -4.303101
-12.728996 -12.144997  -4.247803</Data>
...
<Data>0 1 2
0 3 4
...
575 581 578
576 578 581</Data>

I believe that this is valid according to the GIFTI specification (although the spec is under-specified with regards to plain-text encoding).

I experimented a little, adding extra line breaks into the GIFTI file (left_subthalamic_nucleus_edit.gii.txt):

<Data>
 -6.549202 -11.776001  -9.900600
...
-12.728996 -12.144997  -4.247803
</Data>
...
<Data>
0 1 2
...
576 578 581
</Data>

and this seems to fix the rendering:

left_subthalamic_nucleus_edit

So my guess is that the GIFTI parsing logic in Surf-Ice is ignoring text which appears on the same line as an opening/closing XML element?

streamline visualisation

There does not seem to be away to recolor streamlines to a single arbitrary color or to have multiple streamline overlays open at the same time. Would this be something that would be possible to introduce?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.