Skip to content

Instantly share code, notes, and snippets.

View kaspermarstal's full-sized avatar

Kasper Marstal kaspermarstal

  • Copenhagen
  • 16:40 (UTC +02:00)
View GitHub Profile

Contributor License Agreement

Heavily inspired from keygen.sh SLA, itself heavily inspired by The Apache Software Project CCLA (v r190612)

Thank you for your interest in Cellm (the "Project"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Project must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Project and its users; it does not change your rights to use your own Contributions for any other purpose.

This version of the Agreement allows an entity (the "Corporation") or an individual to submit Contributions to the Project, to authorize Contributions submitted by its designated employees to the Project, and to grant copyright and patent licenses thereto.

You accept and agree to the following terms and conditions for Your present and future Contributions submit

#!/bin/bash -x
PYTHON3=/Users/kasper/anaconda/envs/tensorflow3/bin/python3.6
SUPERELASTIX_SOURCE_DIR=/Users/kasper/Development/SuperElastix
SUPERELASTIX_BUILD_DIR=/Users/kasper/Development/build/SuperElastixRelease
CRC_INPUT_DIR=/Users/kasper/Development/SuperBenchData
CRC_OUTPUT_DIR=/Users/kasper/Data/SuperBench
CRC_MASK_DIR=/Users/kasper/Development/SuperBenchMask
CRC_MAX_NUM_REG_PER_DATASET=2
# CRC_DATASETS="--hammers-input-directory /Users/kasper/Development/SuperBenchData/HAMMERS --popi-input-directory /Users/kasper/Development/SuperBenchData/POPI --popi-mask-directory /Users/kasper/Development/SuperBenchMask/POPI --dirlab-input-directory /Users/kasper/Development/SuperBenchData/DIRLAB --dirlab-mask-directory /Users/kasper/Development/SuperBenchMasks/DIRLAB --spread-input-directory /Users/kasper/Development/SuperBenchData/SPREAD --mgh10-input-directory /Users/kasper/Development/SuperBenchData/MGH10 --cumc12-input-directory /Users/kasper/Development/SuperBenchData/CUMC12 --isbr18-input-directory /Users/k
@kaspermarstal
kaspermarstal / iso2usb.sh
Last active May 28, 2018 08:53
Write Windows 10 ISO to bootable USB on macOS
# If img, convert img to iso (rename to .img if extension is .img.dmg)
hdiutil convert -format UDRW -o windows10.img windows10.iso
# See disks
diskutil list
# Plugin USB and see disks again to identify its disk number. Then unmount the USB e.g. /dev/disk2
diskutil unmount /dev/disk2
# ... or run
List<Image> movingImages = new List<Image> {image1, ..., imageN}
Parallel.ForEach(movingImages, movingImage => Elastix(fixedImage, movingImage))
#include "elxElastixFilter.h"
typedef ElastixFilter< FixedImageType, MovingImageType > ElastixFilterType;
ElastixFilterType::Pointer elastixFilter = ElastixFilterType::New();
elastixFilter->SetFixedImage( fixedImageReader->GetOutput() );
elastixFilter->SetMovingImage( movingImageReader->GetOutput() );
resultImageWriter->SetInput( elastixFilter->GetOutput() );
resultImageWriter->Update();
List<Image> movingImages = Arrays.asList(image1, ... , imageN);
movingImages
.parallelStream()
.forEach((movingImage) -> Elastix(fixedImage, movingImage));
SimpleElastix = SimpleITK.SimpleElastix()
SimpleElastix.SetFixedImage(fixedImage)
for atlasImage, atlasLabels in zip([atlasImage1, atlasImage2], [atlasLabel1, atlasLabel2]):
SimpleElastix.SetMovingImage(SimpleITK.ReadImage(atlasImage))
SimpleElastix.Execute()
resultLabels.push_back(Transformix(atlasLabel, SimpleElastix.GetTransformParameterMap()))
fixedLabel = SimpleITK.LabelVoting(resultLabels)
@kaspermarstal
kaspermarstal / example1.lua
Last active April 7, 2016 13:44
Example 1
fixedImage = SimpleITK.ReadImage("fixedImage.nii")
movingImage = SimpleITK.ReadImage("movingImage.nii")
resultImage = SimpleITK.Elastix(fixedImage, movingImage)