Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Reads DICOM-Files exported with | |
% p:\doc\MeVisLab-Networks\2011\ExtractAcinusAndExport.mlab and save them | |
% as JPG image sequences to further peruse with the STEPanizer.com | |
% First version: 20.06.2011, reading and displaying the DICOM-file | |
% 28.07.2011: Now reads ALL the DICOM-Files in the directory selected on | |
% Line 16 and converts them in one batch. | |
clc | |
clear all |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Makefile based on http://git.io/GIs6og | |
## Define standard Markdown extension | |
MEXT = md | |
## All markdown files in the working directory | |
SRC = $(wildcard *.$(MEXT)) | |
## Bibliography | |
BIB = /home/habi/P/Documents/library.bib |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/habi/843646709a22004fb5654ab6d9a134d6#file-collage-sh | |
cd ~/tmp | |
# Get all images from our team website | |
wget https://www.anatomie.unibe.ch/pages/forsch_myct_team.php --page-requisites --accept .jpg --no-clobber --quiet | |
# Scale images to approximately the same size as my head (264x350) | |
mogrify -resize 264x350 www.anatomie.unibe.ch/users/hlushchuk/kopf.jpg | |
mogrify -resize 264x350 www.anatomie.unibe.ch/users/khoma/kopf.jpg | |
# See how big the files are (if needed) | |
#identify www.anatomie.unibe.ch/users/*/kopf.jpg | |
# Generate montage |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy import ndimage | |
import numpy | |
def shiftimagetocentroid(image): | |
imagecenter = [l/2 for l in numpy.shape(image)] | |
centroid = ndimage.measurements.center_of_mass(image) | |
print(centroid) | |
shift = numpy.subtract(imagecenter, centroid) | |
print(shift) | |
image = scipy.ndimage.interpolation.shift(image, shift, mode='wrap') |