Skip to content

Instantly share code, notes, and snippets.

View lassoan's full-sized avatar

Andras Lasso lassoan

View GitHub Profile
@lassoan
lassoan / export_files_assembla.ps1
Created September 25, 2017 13:49
Download all files from Assembla (Files tool - including all ticket and wiki attachments)
##################
## Written by: Kyle Sunderland
##
## Downloads all files from an assembla project
## Need to change repo_name, api_key, and api_secret for the script to work
##################
$repo_name = "REPO_NAME" # Name of the repo
# personal keys found at: https://app.assembla.com/user/edit/manage_clients
@lassoan
lassoan / LineProfile.py
Last active August 25, 2022 02:45
3D Slicer module for computing intensity profile in a volume along a ruler line
#
#
#
#
#
# This example has been completely reworked and converted to a module, now available at:
#
#
# https://github.com/lassoan/SlicerLineProfile/blob/master/LineProfile/LineProfile.py
#
@lassoan
lassoan / MarkupsInfo.py
Created September 21, 2017 13:17
Compute the total length between all the points of a markup list in 3D Slicer
from __main__ import qt, slicer
#
# MarkupsInfo module
#
class MarkupsInfo:
def __init__(self, parent):
import string
parent.title = "Markups info"
@lassoan
lassoan / SegmentGrowCut.py
Last active August 19, 2021 18:46
This example script demonstrates how a grow-cut operation can be performed without graphical user interface using 3D Slicer
# This example script demonstrates how a grow-cut
# operation can be performed without graphical user interface.
# The first half of the script downloads input data and creates seed segments.
# The second half of the script converts segments to merged labelmap (that's the required
# input format for grow-cut filter), computes the complete segmentation, and writes
# results into new segments.
# Generate input data
################################################
@lassoan
lassoan / SegmentGrowCutSimple.py
Last active May 6, 2023 15:08
This example demonstrates how to run Grow from seeds effect in batch mode (without GUI, using qMRMLSegmentEditorWidget) using 3D Slicer
# Generate input data
################################################
import SampleData
# Load master volume
sampleDataLogic = SampleData.SampleDataLogic()
masterVolumeNode = sampleDataLogic.downloadMRBrainTumor1()
# Create segmentation
@lassoan
lassoan / AngleMeasurement.py
Last active June 22, 2019 20:17
3D Slicer scripted module for measuring angle between rulers
#
# Installation:
# - Save this file as AngleMeasurement.py to a directory on your computer
# - Add the directory to the additional module paths in the Slicer application settings:
# - Choose in the menu: Edit / Application settings
# - Click Modules, click >> next to Additional module paths
# - Click Add, and choose the .py file's location
# - After you restart Slicer, "Angle Measurment" module should show up in Quantification category
#