Dear Donald and other developers,
With my Ubuntu 16.04 computer centrally managed by the Aalto University (although with sudo rights), mrview is constantly crashing (mrview: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access). This happens approximately every 5 minutes during routine zoom / change of view operations (from single to ortho e.g.). This causes a lot of trouble, especially when making connectome figures to restart every time from the scratch. The mrtrix3 build I use is brand new, and I just checked there are no further updates available.
Here’s the configure log and debug information. I would appreciate any tips on this matter, as currently I am forced to use TeamViewer to connect to my home computer to make any figures.
Cheers,
Timo
mrview -version
== mrview 3.0_RC3-135-g2b8e7d0c ==
64 bit release version, built Mar 12 2019, using Eigen 3.2.92
ldd $(which mrview)
linux-vdso.so.1 => (0x00007ffc38997000)
libmrtrix.so => /m/home/home7/72/tjroine/unix/mrtrix3/bin/../lib/libmrtrix.so (0x00007f0515294000)
libQt5Widgets.so.5 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libQt5Widgets.so.5 (0x00007f0514a63000)
libQt5Gui.so.5 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libQt5Gui.so.5 (0x00007f05142c8000)
libQt5Core.so.5 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libQt5Core.so.5 (0x00007f0513ba8000)
libGL.so.1 => /usr/lib/nvidia-384/libGL.so.1 (0x00007f0513866000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0513649000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f05132c7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0512fbe000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0512da8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f05129de000)
/lib64/ld-linux-x86-64.so.2 (0x00007f05156bc000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f05127c4000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f051254f000)
libicui18n.so.56 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libicui18n.so.56 (0x00007f05120b6000)
libicuuc.so.56 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libicuuc.so.56 (0x00007f0511cfe000)
libicudata.so.56 => /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib/libicudata.so.56 (0x00007f051031b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0510117000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f050ff0f000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f050fd0d000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f050f9fc000)
libnvidia-tls.so.384.130 => /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.130 (0x00007f050f7f8000)
libnvidia-glcore.so.384.130 => /usr/lib/nvidia-384/libnvidia-glcore.so.384.130 (0x00007f050d93c000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f050d602000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f050d3f0000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f050d1ce000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f050cfc0000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f050cd67000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f050caf7000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f050c8d5000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f050c6d1000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f050c4cb000)
<CONFIGURE.LOG STARTS>
REPORT:
MRtrix build type requested: release version
REPORT: Detecting OS: linux
REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
error invoking command "clang++": No such file or directory
>>
REPORT: not found
REPORT: Looking for compiler [g++]:
EXEC <<
CMD: g++ --version
EXIT: 0
STDOUT:
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
REPORT: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
REPORT: Checking for C++11 compliance:
COMPILE /tmp/tmpwsdj2X.cpp:
---
#include <cstddef>
struct Base {
Base (int);
};
struct Derived : Base {
using Base::Base;
};
int main() {
Derived D (int); // check for contructor inheritance
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpwsdj2X.cpp -o /tmp/tmpwsdj2X.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpwsdj2X.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: ok
REPORT: Checking shared library generation:
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpG9Epnn.cpp -o /tmp/tmpG9Epnn.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpG9Epnn.o -shared -Wl,--sort-common,--as-needed -pthread -o libtest.so
EXIT: 0
>>
REPORT: ok
REPORT: Detecting pointer size:
COMPILE /tmp/tmpUDeNpr.cpp:
---
#include <iostream>
int main() {
std::cout << sizeof(void*);
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpUDeNpr.cpp -o /tmp/tmpUDeNpr.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpUDeNpr.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
8
>>
REPORT: 64 bit
REPORT: Detecting byte order:
REPORT: little-endian
REPORT: Checking for variable-length array support:
COMPILE /tmp/tmpDuuqQV.cpp:
---
int main(int argc, char* argv[]) {
int x[argc];
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpDuuqQV.cpp -o /tmp/tmpDuuqQV.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpDuuqQV.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: ok
REPORT: Checking for non-POD variable-length array support:
COMPILE /tmp/tmpN1nguI.cpp:
---
#include <string>
class X {
int x;
double y;
std::string s;
};
int main(int argc, char* argv[]) {
X x[argc];
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpN1nguI.cpp -o /tmp/tmpN1nguI.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpN1nguI.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: ok
REPORT: Checking for ::max_align_t:
COMPILE /tmp/tmpGIES3K.cpp:
---
#include <iostream>
#include <cstddef>
using ::max_align_t;
int main() {
std::cout << alignof (max_align_t) << " bytes\n";
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpGIES3K.cpp -o /tmp/tmpGIES3K.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpGIES3K.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
16 bytes
>>
REPORT: 16 bytes
REPORT: Checking for std::max_align_t:
COMPILE /tmp/tmpDnOwwX.cpp:
---
#include <iostream>
#include <cstddef>
using std::max_align_t;
int main() {
std::cout << alignof (max_align_t) << " bytes\n";
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpDnOwwX.cpp -o /tmp/tmpDnOwwX.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpDnOwwX.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
16 bytes
>>
REPORT: 16 bytes
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/include/eigen3
>>
REPORT: Checking for Eigen3 library:
COMPILE /tmp/tmpRDZx3E.cpp:
---
#include <cstddef>
#include <Eigen/Core>
#include <iostream>
int main (int argc, char* argv[]) {
std::cout << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << "\n";
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -isystem /usr/include/eigen3 /tmp/tmpRDZx3E.cpp -o /tmp/tmpRDZx3E.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpRDZx3E.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
3.2.92
>>
REPORT: 3.2.92
EXEC <<
CMD: pkg-config --cflags zlib
EXIT: 0
>>
EXEC <<
CMD: pkg-config --libs zlib
EXIT: 0
STDOUT:
-lz
>>
REPORT: Checking for zlib compression library:
COMPILE /tmp/tmp9wBlOO.cpp:
---
#include <iostream>
#include <zlib.h>
int main() {
std::cout << zlibVersion();
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmp9wBlOO.cpp -o /tmp/tmp9wBlOO.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmp9wBlOO.o -Wl,--sort-common,--as-needed -pthread -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
1.2.8
>>
REPORT: 1.2.8
REPORT: Checking for "JSON for Modern C++" requirements:
COMPILE /tmp/tmprhAYEt.cpp:
---
#include "file/json.h"
int main (int argc, char* argv[])
{
nlohmann::json json;
json["key"] = "value";
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -I/m/home/home7/72/tjroine/unix/mrtrix3/core /tmp/tmprhAYEt.cpp -o /tmp/tmprhAYEt.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmprhAYEt.o -Wl,--sort-common,--as-needed -pthread -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: ok
EXEC <<
CMD: pkg-config --cflags libtiff-4
EXIT: 0
STDOUT:
-I/usr/include/x86_64-linux-gnu
>>
EXEC <<
CMD: pkg-config --libs libtiff-4
EXIT: 0
STDOUT:
-ltiff
>>
REPORT: Checking for TIFF library:
COMPILE /tmp/tmp_Fn8II.cpp:
---
#include <iostream>
#include <tiffio.h>
int main() {
std::cout << TIFFGetVersion();
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -isystem /usr/include/x86_64-linux-gnu /tmp/tmp_Fn8II.cpp -o /tmp/tmp_Fn8II.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmp_Fn8II.o -Wl,--sort-common,--as-needed -pthread -lz -ltiff -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
LIBTIFF, Version 4.0.6
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
>>
REPORT: LIBTIFF, Version 4.0.6
EXEC <<
CMD: pkg-config --cflags fftw3
EXIT: 0
>>
EXEC <<
CMD: pkg-config --libs fftw3
EXIT: 0
STDOUT:
-lfftw3
>>
REPORT: Checking for FFTW library:
COMPILE /tmp/tmpI204e4.cpp:
---
#include <iostream>
#include <fftw3.h>
int main() {
std::cout << fftw_version << "\n";
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -isystem /usr/include/x86_64-linux-gnu /tmp/tmpI204e4.cpp -o /tmp/tmpI204e4.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpI204e4.o -Wl,--sort-common,--as-needed -pthread -lz -ltiff -lfftw3 -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
fftw-3.3.4-sse2-avx
>>
REPORT: fftw-3.3.4-sse2-avx
REPORT: Checking for Qt moc:
EXEC <<
CMD: moc -v
EXIT: 0
STDOUT:
moc 5.8.0
>>
REPORT: moc (version 5.8.0)
REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.8.0 in /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib
>>
REPORT: qmake (version 5.8.0)
REPORT: Checking for Qt rcc:
EXEC <<
CMD: rcc -v
EXIT: 0
STDOUT:
rcc 5.8.0
>>
REPORT: rcc (version 5.8.0)
REPORT: Checking for Qt:
source file "qt.h":
---
#include <QObject>
class Foo: public QObject {
Q_OBJECT;
public:
Foo();
~Foo();
public slots:
void setValue(int value);
signals:
void valueChanged (int newValue);
private:
int value_;
};
---
source file "qt.cpp":
---
#include <iostream>
#include "qt.h"
Foo::Foo() : value_ (42) { connect (this, SIGNAL(valueChanged(int)), this, SLOT(setValue(int))); }
Foo::~Foo() { std::cout << qVersion() << "\n"; }
void Foo::setValue (int value) { value_ = value; }
int main() { Foo f; }
---
project file "qt.pro":
---
CONFIG += c++11
QT += core gui opengl svg
HEADERS += qt.h
SOURCES += qt.cpp
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /tmp/tmpPvRRqS/.qmake.stash
>>
EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -isystem /usr/include/x86_64-linux-gnu -DEIGEN_FFTW_DEFAULT -pipe -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtOpenGL -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtSvg -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtWidgets -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtGui -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtCore -isystem /usr/include/libdrm -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/mkspecs/linux-g++ qt.cpp -o qt.o
EXIT: 0
>>
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -isystem /usr/include/x86_64-linux-gnu -DEIGEN_FFTW_DEFAULT -pipe -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtOpenGL -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtSvg -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtWidgets -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtGui -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/include/QtCore -isystem /usr/include/libdrm -isystem /work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/mkspecs/linux-g++ qt_moc.cpp -o qt_moc.o
EXIT: 0
>>
EXEC <<
CMD: g++ -Wl,--sort-common,--as-needed -pthread -lz -ltiff -lfftw3 qt_moc.o qt.o -o qt -Wl,-O1 -Wl,-rpath,/work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib -lQt5OpenGL -L/work/modules/Ubuntu/16.04/amd64/common/qt/5.8.0/5.8/gcc_64/lib -lQt5Svg -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
EXIT: 0
>>
EXEC <<
CMD: /tmp/tmpPvRRqS/qt
EXIT: 0
STDOUT:
5.8.0
>>
REPORT: 5.8.0
mrview -debug
mrview: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrview: [DEBUG] No config file found at "/u/72/tjroine/unix/.mrtrix.conf"
mrview: [INFO] GL renderer: Quadro K2200/PCIe/SSE2
mrview: [INFO] GL version: 3.3.0 NVIDIA 384.130
mrview: [INFO] GL vendor: NVIDIA Corporation
mrview: [DEBUG] loading font into OpenGL texture...
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 font_pos;
uniform float scale_x;
uniform float scale_y;
out vec2 tex_coord;
void main () {
gl_Position = vec4 (pos[0]*scale_x-1.0, pos[1]*scale_y-1.0, 0.0, 1.0);
tex_coord = font_pos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in vec2 tex_coord;
uniform sampler2D sampler;
uniform float red, green, blue;
out vec4 color;
void main () {
color.ra = texture (sampler, tex_coord).rg;
color.rgb = color.r * vec3 (red, green, blue);
}
mrview: [DEBUG] font loaded
(mrview:262049): Gtk-WARNING **: Invalid input string
(mrview:262049): Gtk-WARNING **: Invalid input string
mrview: [INFO] opening image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz"...
mrview: [DEBUG] transforms_match: FOV difference in scanner coordinates: 2.0854681425767421
mrview: [WARNING] qform and sform are inconsistent in NIfTI image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" - using qform
mrview: [DEBUG] sanitising image information...
mrview: [INFO] Axes and transform of image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" altered to approximate RAS coordinate system
mrview: [DEBUG] searching for suitable phase encoding data...
mrview: [INFO] image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" opened with dimensions 165x242x160, voxel spacing 1.0104923248291016x1.0245541334152222x1.0062757730484009, datatype Float32LE
mrview: [DEBUG] loading image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz"...
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz"
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" [done]
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" loaded
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/anat_masked_crop.nii.gz" initialised with strides = [ -1 165 39930 ], start = 164, using indirect IO
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 data;
uniform float scale_x, scale_y;
out float amplitude;
void main () {
gl_Position = vec4 (data.x*scale_x-1.0, data.y*scale_y-1.0, 0.0, 1.0);
amplitude = data.z;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in float amplitude;
out vec3 color;
uniform vec3 colourmap_colour;
void main () {
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3(1.0, 1.0, 0.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [INFO] opening image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz"...
mrview: [DEBUG] transforms_match: FOV difference in scanner coordinates: 2.1091758115057311
mrview: [WARNING] qform and sform are inconsistent in NIfTI image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" - using qform
mrview: [DEBUG] sanitising image information...
mrview: [INFO] Axes and transform of image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" altered to approximate RAS coordinate system
mrview: [DEBUG] searching for suitable phase encoding data...
mrview: [INFO] image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" opened with dimensions 334x496x323x3, voxel spacing 0.5x0.5x0.5xnan, datatype Float32LE
mrview: [DEBUG] loading image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz"...
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz"
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" [done]
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" loaded
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/tckmap_ifod2_10M_gmwmi_act_0.5mm_dec.nii.gz" initialised with strides = [ -1 334 165664 53509472 ], start = 333, using indirect IO
mrview: [INFO] mrview: loading image data
mrview: [INFO] mrview: loading image data [done]
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = length (color.rgb);
if (isnan(amplitude) || isinf(amplitude)) discard;
if (amplitude < alpha_offset) discard;
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
color.rgb = scale * (abs(color.rgb) - offset);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [INFO] mrview: loading image data
mrview: [INFO] mrview: loading image data [done]
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 vertpos;
uniform mat4 M;
out vec3 texcoord;
uniform mat4 overlay_M0;
out vec3 overlay_texcoord0;
void main () {
texcoord = vertpos;
gl_Position = M * vec4 (vertpos,1);
overlay_texcoord0 = (overlay_M0 * vec4 (vertpos,1)).xyz;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D image_sampler;
in vec3 texcoord;
uniform float overlay0_offset;
uniform float overlay0_scale;
uniform float overlay0_alpha_scale;
uniform float overlay0_alpha_offset;
uniform float overlay0_alpha;
uniform sampler3D overlay_sampler0;
uniform vec3 overlay_ray0;
uniform vec3 overlay0_colourmap_colours;
in vec3 overlay_texcoord0;
uniform sampler2D depth_sampler;
uniform mat4 M;
uniform float ray_z, selection_thickness;
uniform vec3 ray;
out vec4 final_color;
void main () {
float amplitude;
vec4 color;
final_color = vec4 (0.0);
float dither = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453);
vec3 coord = texcoord + ray * dither;
vec3 overlay_coord0 = overlay_texcoord0 + overlay_ray0 * dither;
float depth = texelFetch (depth_sampler, ivec2(gl_FragCoord.xy), 0).r;
float current_depth = gl_FragCoord.z + ray_z * dither;
int nmax = 10000;
if (ray.x < 0.0) nmax = int (-texcoord.s/ray.x);
else if (ray.x > 0.0) nmax = int ((1.0-texcoord.s) / ray.x);
if (ray.y < 0.0) nmax = min (nmax, int (-texcoord.t/ray.y));
else if (ray.y > 0.0) nmax = min (nmax, int ((1.0-texcoord.t) / ray.y));
if (ray.z < 0.0) nmax = min (nmax, int (-texcoord.p/ray.z));
else if (ray.z > 0.0) nmax = min (nmax, int ((1.0-texcoord.p) / ray.z));
nmax = min (nmax, int ((depth - current_depth) / ray_z));
if (nmax <= 0) return;
for (int n = 0; n < nmax; ++n) {
coord += ray;
color = texture (image_sampler, coord);
amplitude = color.r;
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= alpha_offset) {
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
overlay_coord0 += overlay_ray0;
if (overlay_coord0.s >= 0.0 && overlay_coord0.s <= 1.0 &&
overlay_coord0.t >= 0.0 && overlay_coord0.t <= 1.0 &&
overlay_coord0.p >= 0.0 && overlay_coord0.p <= 1.0) {
color = texture (overlay_sampler0, overlay_coord0);
amplitude = length (color.rgb);
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= overlay0_alpha_offset) {
color.rgb = overlay0_scale * (abs(color.rgb) - overlay0_offset);
color.a = amplitude * overlay0_alpha;
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
}
if (final_color.a > 0.95) break;
}
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 vertpos;
uniform mat4 M;
out vec3 texcoord;
uniform mat4 overlay_M0;
out vec3 overlay_texcoord0;
void main () {
texcoord = vertpos;
gl_Position = M * vec4 (vertpos,1);
overlay_texcoord0 = (overlay_M0 * vec4 (vertpos,1)).xyz;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D image_sampler;
in vec3 texcoord;
uniform float overlay0_offset;
uniform float overlay0_scale;
uniform float overlay0_alpha_scale;
uniform float overlay0_alpha_offset;
uniform float overlay0_alpha;
uniform sampler3D overlay_sampler0;
uniform vec3 overlay_ray0;
uniform vec3 overlay0_colourmap_colours;
in vec3 overlay_texcoord0;
uniform sampler2D depth_sampler;
uniform mat4 M;
uniform float ray_z, selection_thickness;
uniform vec3 ray;
out vec4 final_color;
void main () {
float amplitude;
vec4 color;
final_color = vec4 (0.0);
float dither = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453);
vec3 coord = texcoord + ray * dither;
vec3 overlay_coord0 = overlay_texcoord0 + overlay_ray0 * dither;
float depth = texelFetch (depth_sampler, ivec2(gl_FragCoord.xy), 0).r;
float current_depth = gl_FragCoord.z + ray_z * dither;
int nmax = 10000;
if (ray.x < 0.0) nmax = int (-texcoord.s/ray.x);
else if (ray.x > 0.0) nmax = int ((1.0-texcoord.s) / ray.x);
if (ray.y < 0.0) nmax = min (nmax, int (-texcoord.t/ray.y));
else if (ray.y > 0.0) nmax = min (nmax, int ((1.0-texcoord.t) / ray.y));
if (ray.z < 0.0) nmax = min (nmax, int (-texcoord.p/ray.z));
else if (ray.z > 0.0) nmax = min (nmax, int ((1.0-texcoord.p) / ray.z));
nmax = min (nmax, int ((depth - current_depth) / ray_z));
if (nmax <= 0) return;
for (int n = 0; n < nmax; ++n) {
coord += ray;
color = texture (image_sampler, coord);
amplitude = color.r;
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= alpha_offset) {
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
overlay_coord0 += overlay_ray0;
if (overlay_coord0.s >= 0.0 && overlay_coord0.s <= 1.0 &&
overlay_coord0.t >= 0.0 && overlay_coord0.t <= 1.0 &&
overlay_coord0.p >= 0.0 && overlay_coord0.p <= 1.0) {
color = texture (overlay_sampler0, overlay_coord0);
amplitude = length (color.rgb);
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= overlay0_alpha_offset) {
color.rgb = overlay0_scale * (abs(color.rgb) - overlay0_offset);
color.a = amplitude * overlay0_alpha;
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
}
if (final_color.a > 0.95) break;
}
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 vertpos;
uniform mat4 M;
out vec3 texcoord;
uniform mat4 overlay_M0;
out vec3 overlay_texcoord0;
void main () {
texcoord = vertpos;
gl_Position = M * vec4 (vertpos,1);
overlay_texcoord0 = (overlay_M0 * vec4 (vertpos,1)).xyz;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D image_sampler;
in vec3 texcoord;
uniform float overlay0_offset;
uniform float overlay0_scale;
uniform float overlay0_alpha_scale;
uniform float overlay0_alpha_offset;
uniform float overlay0_alpha;
uniform sampler3D overlay_sampler0;
uniform vec3 overlay_ray0;
uniform vec3 overlay0_colourmap_colours;
in vec3 overlay_texcoord0;
uniform sampler2D depth_sampler;
uniform mat4 M;
uniform float ray_z, selection_thickness;
uniform vec3 ray;
out vec4 final_color;
void main () {
float amplitude;
vec4 color;
final_color = vec4 (0.0);
float dither = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453);
vec3 coord = texcoord + ray * dither;
vec3 overlay_coord0 = overlay_texcoord0 + overlay_ray0 * dither;
float depth = texelFetch (depth_sampler, ivec2(gl_FragCoord.xy), 0).r;
float current_depth = gl_FragCoord.z + ray_z * dither;
int nmax = 10000;
if (ray.x < 0.0) nmax = int (-texcoord.s/ray.x);
else if (ray.x > 0.0) nmax = int ((1.0-texcoord.s) / ray.x);
if (ray.y < 0.0) nmax = min (nmax, int (-texcoord.t/ray.y));
else if (ray.y > 0.0) nmax = min (nmax, int ((1.0-texcoord.t) / ray.y));
if (ray.z < 0.0) nmax = min (nmax, int (-texcoord.p/ray.z));
else if (ray.z > 0.0) nmax = min (nmax, int ((1.0-texcoord.p) / ray.z));
nmax = min (nmax, int ((depth - current_depth) / ray_z));
if (nmax <= 0) return;
for (int n = 0; n < nmax; ++n) {
coord += ray;
color = texture (image_sampler, coord);
amplitude = color.r;
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= alpha_offset) {
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
amplitude = clamp (1.0 - scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
overlay_coord0 += overlay_ray0;
if (overlay_coord0.s >= 0.0 && overlay_coord0.s <= 1.0 &&
overlay_coord0.t >= 0.0 && overlay_coord0.t <= 1.0 &&
overlay_coord0.p >= 0.0 && overlay_coord0.p <= 1.0) {
color = texture (overlay_sampler0, overlay_coord0);
amplitude = length (color.rgb);
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= overlay0_alpha_offset) {
color.rgb = overlay0_scale * (abs(color.rgb) - overlay0_offset);
color.a = amplitude * overlay0_alpha;
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
}
if (final_color.a > 0.95) break;
}
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 vertpos;
uniform mat4 M;
out vec3 texcoord;
uniform mat4 overlay_M0;
out vec3 overlay_texcoord0;
void main () {
texcoord = vertpos;
gl_Position = M * vec4 (vertpos,1);
overlay_texcoord0 = (overlay_M0 * vec4 (vertpos,1)).xyz;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D image_sampler;
in vec3 texcoord;
uniform float overlay0_offset;
uniform float overlay0_scale;
uniform float overlay0_alpha_scale;
uniform float overlay0_alpha_offset;
uniform float overlay0_alpha;
uniform sampler3D overlay_sampler0;
uniform vec3 overlay_ray0;
uniform vec3 overlay0_colourmap_colours;
in vec3 overlay_texcoord0;
uniform sampler2D depth_sampler;
uniform mat4 M;
uniform float ray_z, selection_thickness;
uniform vec3 ray;
out vec4 final_color;
void main () {
float amplitude;
vec4 color;
final_color = vec4 (0.0);
float dither = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453);
vec3 coord = texcoord + ray * dither;
vec3 overlay_coord0 = overlay_texcoord0 + overlay_ray0 * dither;
float depth = texelFetch (depth_sampler, ivec2(gl_FragCoord.xy), 0).r;
float current_depth = gl_FragCoord.z + ray_z * dither;
int nmax = 10000;
if (ray.x < 0.0) nmax = int (-texcoord.s/ray.x);
else if (ray.x > 0.0) nmax = int ((1.0-texcoord.s) / ray.x);
if (ray.y < 0.0) nmax = min (nmax, int (-texcoord.t/ray.y));
else if (ray.y > 0.0) nmax = min (nmax, int ((1.0-texcoord.t) / ray.y));
if (ray.z < 0.0) nmax = min (nmax, int (-texcoord.p/ray.z));
else if (ray.z > 0.0) nmax = min (nmax, int ((1.0-texcoord.p) / ray.z));
nmax = min (nmax, int ((depth - current_depth) / ray_z));
if (nmax <= 0) return;
for (int n = 0; n < nmax; ++n) {
coord += ray;
color = texture (image_sampler, coord);
amplitude = color.r;
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= alpha_offset) {
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
overlay_coord0 += overlay_ray0;
if (overlay_coord0.s >= 0.0 && overlay_coord0.s <= 1.0 &&
overlay_coord0.t >= 0.0 && overlay_coord0.t <= 1.0 &&
overlay_coord0.p >= 0.0 && overlay_coord0.p <= 1.0) {
color = texture (overlay_sampler0, overlay_coord0);
amplitude = length (color.rgb);
if (!isnan(amplitude) && !isinf(amplitude) && amplitude >= overlay0_alpha_offset) {
color.rgb = overlay0_scale * (abs(color.rgb) - overlay0_offset);
color.a = amplitude * overlay0_alpha;
final_color.rgb += (1.0 - final_color.a) * color.rgb * color.a;
final_color.a += color.a;
}
}
if (final_color.a > 0.95) break;
}
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [INFO] opening image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz"...
mrview: [DEBUG] transforms_match: FOV difference in scanner coordinates: 2.0854681425767421
mrview: [WARNING] qform and sform are inconsistent in NIfTI image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" - using qform
mrview: [DEBUG] sanitising image information...
mrview: [INFO] Axes and transform of image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" altered to approximate RAS coordinate system
mrview: [DEBUG] searching for suitable phase encoding data...
mrview: [INFO] image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" opened with dimensions 165x242x160, voxel spacing 1.0104923248291016x1.0245541334152222x1.0062757730484009, datatype Float32LE
mrview: [DEBUG] loading image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz"...
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz"
mrview: [INFO] mrview: uncompressing image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" [done]
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" loaded
mrview: [DEBUG] image "/m/nbe/work/tjroine/tbi/default_labels_crop.nii.gz" initialised with strides = [ -1 165 39930 ], start = 164, using indirect IO
mrview: [INFO] mrview: loading image data
mrview: [INFO] mrview: loading image data [done]
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform float alpha_scale;
uniform float alpha_offset;
uniform float alpha;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
if (amplitude < alpha_offset) discard;
color.a = clamp ((amplitude - alpha_offset) * alpha_scale, 0, alpha);
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (2.7213 * amplitude, 2.7213 * amplitude - 1.0, 3.7727 * amplitude - 2.7727);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec4 color;
void main () {
color = vec4 (0.5, 0.5, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec3 data;
uniform float scale_x, scale_y;
out float amplitude;
void main () {
gl_Position = vec4 (data.x*scale_x-1.0, data.y*scale_y-1.0, 0.0, 1.0);
amplitude = data.z;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in float amplitude;
out vec3 color;
uniform vec3 colourmap_colour;
void main () {
color.rgb = vec3 (2.7213 * amplitude, 2.7213 * amplitude - 1.0, 3.7727 * amplitude - 2.7727);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3(1.0, 1.0, 0.0);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location=0) in vec2 pos;
void main () {
gl_Position = vec4 (pos, 0.0, 1.0);
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
out vec3 color;
void main () {
color = vec3 (0.1);
}
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertpos;
layout(location = 1) in vec3 texpos;
uniform mat4 MVP;
out vec3 texcoord;
void main() {
gl_Position = MVP * vec4 (vertpos,1);
texcoord = texpos;
}
mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform float offset;
uniform float scale;
uniform sampler3D tex;
in vec3 texcoord;
out vec4 color;
void main() {
if (texcoord.s < 0.0 || texcoord.s > 1.0 ||
texcoord.t < 0.0 || texcoord.t > 1.0 ||
texcoord.p < 0.0 || texcoord.p > 1.0) discard;
color = texture (tex, texcoord.stp);
float amplitude = color.r;
if (isnan(amplitude) || isinf(amplitude)) discard;
amplitude = clamp ( scale * (amplitude - offset), 0.0, 1.0);
color.rgb = vec3 (amplitude);
}
(mrview:262049): Gtk-WARNING **: Invalid input string
(mrview:262049): Gtk-WARNING **: Invalid input string
mrview: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access