Skip to content

Instantly share code, notes, and snippets.

@issakomi
issakomi / loadSEGmesh.py
Last active March 20, 2023 15:58
View DICOM SEG mesh with VTK and pydicom
# View DICOM SEG Surface Segmentation.
#
# Run standalone (VTK Python 3 and pydicom >= 2 are required)
# python3 loadSEGmesh.py <file>
#
# or from Slicer >= 4.11
# Slicer --python-script loadSEGmesh.py <file>
# (caution with Slicer RAS space, s. options below)
#
#
@christophercrouzet
christophercrouzet / distance.h
Last active April 16, 2024 13:02
Compute the distance in ulps between floating-point numbers in C++11.
#ifndef DISTANCE_H
#define DISTANCE_H
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>
#include "floatingpointtraits.h"