keyword
stringclasses
7 values
repo_name
stringlengths
8
98
file_path
stringlengths
4
244
file_extension
stringclasses
29 values
file_size
int64
0
84.1M
line_count
int64
0
1.6M
content
stringlengths
1
84.1M
language
stringclasses
14 values
3D
hku-mars/ImMesh
src/meshing/tinycolormap.hpp
.hpp
104,096
2,467
/* MIT License Copyright (c) 2018-2020 Yuki Koyama Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
Unknown
3D
hku-mars/ImMesh
src/meshing/mesh_rec_display.cpp
.cpp
12,849
327
#define STB_IMAGE_WRITE_IMPLEMENTATION #define STBI_MSC_SECURE_CRT #include "mesh_rec_display.hpp" #include "tools/openGL_libs/gl_draw_founction.hpp" #include "tools_timer.hpp" #include "tinycolormap.hpp" #include "tools/openGL_libs/openGL_camera.hpp" extern Global_map g_map_rgb_pts_mesh; extern Tri...
C++
3D
hku-mars/ImMesh
src/meshing/mesh_rec_geometry.cpp
.cpp
16,170
435
#include "mesh_rec_geometry.hpp" #include "tinycolormap.hpp" #include <pcl/io/ply_io.h> #include <tbb/tbb.h> #include <tbb/blocked_range.h> #include <tbb/parallel_for.h> #include <pcl/kdtree/kdtree_flann.h> extern double g_color_val_min, g_color_val_max; extern int g_force_update_flag; extern Global_map g_m...
C++
3D
hku-mars/ImMesh
src/meshing/delaunay/openCV_subdiv2d_index.hpp
.hpp
1,560
52
#pragma once #include <opencv2/opencv.hpp> class Subdiv2DIndex : public cv::Subdiv2D { public : Subdiv2DIndex(cv::Rect rectangle); //Source code of Subdiv2D: https://github.com/opencv/opencv/blob/master/modules/imgproc/src/subdivision2d.cpp#L762 //The implementation tweaks getTrianglesList() so that only the in...
Unknown
3D
hku-mars/ImMesh
src/meshing/optical_flow/lkpyramid.cpp
.cpp
34,391
821
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
C++
3D
hku-mars/ImMesh
src/meshing/optical_flow/lkpyramid.hpp
.hpp
6,321
135
// This file is modified from lkpyramid.hpp of openCV #pragma once #include "opencv2/core.hpp" #include "opencv2/highgui.hpp" #include "opencv2/video/tracking.hpp" #include "opencv2/imgproc.hpp" #define CV_CPU_HAS_SUPPORT_SSE2 1 #define USING_OPENCV_TBB 1 #include "opencv2/core/hal/intrin.hpp" #include "tools_logger.hp...
Unknown
3D
hku-mars/ImMesh
src/meshing/r3live/triangle.cpp
.cpp
3,178
80
#include "triangle.hpp" vec_3 Triangle_manager::get_triangle_center(const Triangle_ptr& tri_ptr) { vec_3 triangle_pos = ( m_pointcloud_map->m_rgb_pts_vec[ tri_ptr->m_tri_pts_id[ 0 ] ]->get_pos() + m_pointcloud_map->m_rgb_pts_vec[ tri_ptr->m_tri_pts_id[ 1 ] ]->get_pos() + ...
C++
3D
hku-mars/ImMesh
src/meshing/r3live/pointcloud_rgbd.cpp
.cpp
39,836
958
/* This code is the implementation of our paper "R3LIVE: A Robust, Real-time, RGB-colored, LiDAR-Inertial-Visual tightly-coupled state Estimation and mapping package". Author: Jiarong Lin < ziv.lin.ljr@gmail.com > If you use any code of this repo in your academic research, please cite at least one of our papers: [1...
C++
3D
hku-mars/ImMesh
src/meshing/r3live/image_frame.hpp
.hpp
11,622
315
/* This code is the implementation of our paper "R3LIVE: A Robust, Real-time, RGB-colored, LiDAR-Inertial-Visual tightly-coupled state Estimation and mapping package". Author: Jiarong Lin < ziv.lin.ljr@gmail.com > If you use any code of this repo in your academic research, please cite at least one of our papers: ...
Unknown
3D
hku-mars/ImMesh
src/meshing/r3live/triangle.hpp
.hpp
14,546
430
#pragma once #include <set> #include <unordered_set> #include "tools_kd_hash.hpp" #include "pointcloud_rgbd.hpp" // class RGB_pts; // class RGB_Voxel; class Global_map; class Triangle { public: int m_tri_pts_id[ 3 ] = { 0 }; vec_3 m_normal = vec_3( 0, 0, 0 ); int m_projected_texture_id = 0; vec...
Unknown
3D
hku-mars/ImMesh
src/meshing/r3live/image_frame.cpp
.cpp
13,935
402
/* This code is the implementation of our paper "R3LIVE: A Robust, Real-time, RGB-colored, LiDAR-Inertial-Visual tightly-coupled state Estimation and mapping package". Author: Jiarong Lin < ziv.lin.ljr@gmail.com > If you use any code of this repo in your academic research, please cite at least one of our papers: ...
C++
3D
hku-mars/ImMesh
src/meshing/r3live/pointcloud_rgbd.hpp
.hpp
15,825
375
/* This code is the implementation of our paper "R3LIVE: A Robust, Real-time, RGB-colored, LiDAR-Inertial-Visual tightly-coupled state Estimation and mapping package". Author: Jiarong Lin < ziv.lin.ljr@gmail.com > If you use any code of this repo in your academic research, please cite at least one of our papers: [1...
Unknown
3D
Aswendt-Lab/AIDAmri
AIDAmri_workshop.ipynb
.ipynb
175,298
2,986
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Table of contents\n", "* [Before we start](#intro)\n", " - [Prerequisites](#prereq)\n", " - [About the notebook](#aboutnb)\n", " - [Test data](#testd)\n", "* [From build to launch](#fbtl)\n", " - [...
Unknown
3D
Aswendt-Lab/AIDAmri
fslinstaller_mod.py
.py
103,777
3,100
#!/usr/bin/python from __future__ import print_function import collections import csv import errno import getpass import itertools import json import locale import os import platform import threading import time import shlex import socket import sys import readline import tempfile import re import fileinput # py3 tr...
Python
3D
Aswendt-Lab/AIDAmri
bin/__init__.py
.py
33
2
from PV2NIfTiConverter import *
Python
3D
Aswendt-Lab/AIDAmri
bin/conv2Nifti_auto.py
.py
20,037
478
""" Created on 18/10/2023 @author: Marc Schneider AG Neuroimaging and Neuroengineering of Experimental Stroke Department of Neurology, University Hospital Cologne This script automates the conversion from the raw bruker data format to the NIfTI format for the whole dataset using brkraw. The raw data needs to be store...
Python
3D
Aswendt-Lab/AIDAmri
bin/batchProc.py
.py
21,057
443
""" Created on 18/11/2020 @author: Marc Schneider AG Neuroimaging and Neuroengineering of Experimental Stroke Department of Neurology, University Hospital Cologne This script runs every needed script for all (pre-)processing and registration steps. The data needs to be ordered like after Bruker2NIfTI conversion: proj...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/proc_tools.py
.py
11,672
257
''' Created on 29.09.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne ''' from __future__ import print_function import csv import os import sys import nibabel as nib from datetime import datetime # directories lib_in_dir = r'C:\Users\Public\Linux\shared_folder\AIDAmri\lib' pr...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/04_examine_rois.py
.py
1,858
62
''' Created on 25.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Description: Helper tool to compare the number of voxels included in the peri-infarct region for each subject. ''' from __future__ import print_function try: zrange = xrange except NameError: zrange =...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/02_apply_xfm_process.py
.py
17,479
346
''' Created on 19.10.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Description: Pre-requisite: 01_dilate_mask_process.py Result: for all time points the peri-infarct masks will be aligned in the rsfMRI and DTI space Two scans of the same session can be aligned to each other w...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/create_seed_rois.py
.py
6,520
182
''' Created on 20.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne ''' from __future__ import print_function try: zrange = xrange except NameError: zrange = range import os import sys import numpy as np import nibabel as nib import proc_tools as pt def create_rois...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/fsl_mean_ts.py
.py
2,881
92
''' Created on 31.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne ''' from __future__ import print_function try: zrange = xrange except NameError: zrange = range import os import sys import numpy as np import scipy.io as sio import proc_tools as pt def mean_ts(pa...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/apply_xfm.py
.py
5,919
178
''' Created on 20.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne ''' from __future__ import print_function try: zrange = xrange except NameError: zrange = range import os import sys import numpy as np import proc_tools as pt def get_mat_flip_x_z(data_dims, voxel...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/pv_parser.py
.py
13,157
417
''' Created on 20.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Read Bruker ParaVision JCAMP parameter files (e.g. acqp, method, visu_pars). ''' from __future__ import print_function VERSION = 'pv_parser.py v 1.0.2 20200820' import re import sys import collections impo...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/01_dilate_mask_process.py
.py
9,824
230
''' Created on 19.10.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Description: Pre-requisits: stroke mask was defined at post stroke day 7 (P7) Result: for all time points the peri-infarct mask is created aligned to the individual T2w MRI data 1. Time point P7: For each subj...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/03_create_seed_rois_process.py
.py
12,461
253
''' Created on 19.10.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Description: Pre-requisite: 02_apply_xfm_process.py Result: rsfMRI - a Matlab file which contains two text files: 1) for each region one column with the averaged rsfMRI time series and 2) the atlas labels names...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/dilate_mask.py
.py
1,916
73
''' Created on 20.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne ''' from __future__ import print_function try: zrange = xrange except NameError: zrange = range import os import sys import numpy as np from scipy import ndimage import proc_tools as pt def circle...
Python
3D
Aswendt-Lab/AIDAmri
bin/5.1_ROI_analysis/pv_reader.py
.py
19,580
491
''' Created on 19.10.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Read Bruker ParaVision data (2dseq) and save as NIfTI file. Create a b-table text file with b-values and directions for diffusion data. ''' from __future__ import print_function try: zrange = xrange excep...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/getSingleRegTable.py
.py
5,280
138
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import numpy as np import glob import shutil import parReader import i32Reader def findData(path,addon): reg_list = [] fileALL = glob.iglob(path+'/'+addon...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/correlate_matrix.py
.py
914
23
import numpy as np import scipy.io as io from scipy.stats import pearsonr def calculate_p_corr_matrix(data, lines, output_paths): (rows, cols) = np.shape(data) correlation_matrix = np.zeros((cols,cols)) p_value_matrix = np.zeros((cols,cols)) for i in range(cols): for j in range(i+1, cols): ...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/regress.py
.py
11,859
330
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import nibabel as nii import numpy as np import nipype.interfaces.fsl as fsl import glob import shutil from pathlib import Path def scaleBy10(input_path,inv): ...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/process_fMRI.py
.py
13,283
363
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys, os import nipype.interfaces.fsl as fsl import nibabel as nii import numpy as np import glob import shutil import regress import getSingleRegTable import scipy.misc as...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/parReader.py
.py
1,205
51
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import numpy as np import os,sys def getPar(filename): ## Open the text file. fileID = open(filename,'r') # Read columns of data according to the format. fileID...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/correlate_seed_voxels.py
.py
5,780
155
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import argparse import os import sys import numpy as np import nibabel as nib from datetime import datetime def get_date(): now = dat...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/create_seed_rois.py
.py
9,633
272
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import argparse import os import sys import numpy as np import nibabel as nib from datetime import datetime def startSeedPoint(in_labels,in...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/fsl_mean_ts.py
.py
6,495
173
""" Created on 07.12.2015 @author: michaeld """ from __future__ import print_function import argparse import os import sys import numpy as np import nibabel as nib import scipy.io as io import correlate_matrix from datetime import datetime def start_fsl_mean_ts(sPathData,sPathMask,labelNames,postTxt): # input...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/getRegrTable.py
.py
5,398
135
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import numpy as np import glob import parReader import i32Reader def findData(path,addon): reg_list = [] fileALL = glob.iglob(path+'/'+addon, recursive=True...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/peakdet.py
.py
2,337
87
""" Converted from MATLAB script at http://billauer.co.il/peakdet.html Returns two arrays function [maxtab, mintab]=peakdet(v, delta, x) %PEAKDET Detect peaks in a vector % [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local % maxima and minima ("peaks") in the vector V. % MAXTAB and MINTAB cons...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/plotfMRI_mat.py
.py
2,137
76
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import matplotlib.pyplot as plt import os, sys import numpy as np import scipy.io as sio np.seterr(divide='ignore', invalid='ignore') import seaborn as sns def matrixMaker(ma...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.3_fMRIActivity/i32Reader.py
.py
5,214
153
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import numpy as np import peakdet as pk import scipy.signal as sc # noinspection PyTypeChecker def getI32(file_name,numberOfSlices,numberOfAllRepitionsParTable)...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2.1_DTIdata_extract/iterativeRun.py
.py
1,074
45
''' Created on 08.04.2019 @author: Niklas Pallast process all DTI data ''' import glob import os import numpy as np def findData(path): regAtlas_list = [] fileALL = glob.iglob(path + '/P*/S*/DTI/DSI_studio/*_rsfMRISplit_scaled.nii.gz', recursive=True) for filename in fileALL: regAtlas_list.ap...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2.1_DTIdata_extract/iterativeRun_MA_peri-infarct_ROIs.py
.py
2,326
66
''' Created on 08.04.2019 Updated: 26.09.2020 @author: Niklas Pallast and Markus Aswendt process all DTI data ''' import glob import os import numpy as np def findData(path): regAtlas_list = [] fileALL = glob.iglob(path + '/GV*/DTI/DSI_studio/*mod_peri_scaled.nii.gz', recursive=True) for filename in f...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2.1_DTIdata_extract/DTIdata_extract.py
.py
3,384
102
"""" Created on 06.04.2019 @authors: Niklas Pallast """ import os import sys import argparse import numpy as np import nibabel as nii def getOutfile(roi_file,img_file): imgName = os.path.basename(img_file) baseName = str.split(os.path.basename(roi_file),'.')[0] dtiParam = str.split(imgName,'.')[-3] ...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2.1_DTIdata_extract/iterativeRun_MA_stroke_mask.py
.py
2,323
65
''' Created on 08.04.2019 Updated: 26.09.2020 @author: Niklas Pallast and Markus Aswendt process all DTI data ''' import glob import os import numpy as np def findData(path): regAtlas_list = [] fileALL = glob.iglob(path + '/GV*/DTI/DSI_studio/*StrokeMask_scaled.nii.gz', recursive=True) for filename in...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2.1_DTIdata_extract/iterativeRun_MA.py
.py
2,331
66
''' Created on 08.04.2019 Updated: 26.09.2020 @author: Niklas Pallast and Markus Aswendt process all DTI data ''' import glob import os import numpy as np def findData(path): regAtlas_list = [] fileALL = glob.iglob(path + '/GV*/DTI/DSI_studio/*_rsfMRISplit_scaled.nii.gz', recursive=True) for filename ...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/registration_T2MAP.py
.py
10,120
233
""" Created on 11/09/2023 @author: Marc Schneider Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne Documentation preface, added 23/05/09 by Victor Vera Frazao: This document is currently in revision for improvement and fixing. Specifically changes are made to allow compatibility of...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/t2map_data_extract.py
.py
4,617
108
import nibabel as nii import numpy as np import argparse import os import glob import csv import sys # Added import statement for sys module def getOutfile(atlas_type, img_file, suffix): imgName = os.path.basename(img_file) t2map = str.split(imgName, '.')[-3] acronym_name = os.path.basename(atlas_type).sp...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/preProcessing_T2MAP.py
.py
6,671
200
""" Created on 11/09/2023 @author: Marc Schneider Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import nipype.interfaces.fsl as fsl import os, sys import nibabel as nii import numpy as np import applyMICO import cv2 from pathlib import Path import shutil import subprocess ...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/anisodiff.py
.py
2,762
87
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import numpy as np import scipy.ndimage def applyFilter(im, num_iter, delta_t, kappa, option): # Convert input image to float. im.astype(float) # PDE(partial diffe...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/MICO.py
.py
2,666
113
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/4.1_T2mapPreProcessing/applyMICO.py
.py
5,649
216
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.1_T2PreProcessing/MICO.py
.py
3,015
123
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.1_T2PreProcessing/t2_value_extraction.py
.py
4,809
111
import nibabel as nii import numpy as np import argparse import os import glob import csv import sys # Added import statement for sys module def getOutfile(atlas_type, img_file, suffix): imgName = os.path.basename(img_file) t2map = str.split(imgName, '.')[-3] acronym_name = os.path.basename(atlas_type).sp...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.1_T2PreProcessing/preProcessing_T2.py
.py
5,376
184
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import nipype.interfaces.fsl as fsl import os,sys import nibabel as nii import numpy as np import applyMICO import subprocess import shutil def reset_orientation(input_file): ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.1_T2PreProcessing/registration_T2.py
.py
12,410
282
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import numpy as np import nibabel as nii import glob import subprocess import shlex def BET_2_MPIreg(inputVolume, stroke_mask,brain_template, allenBrain_template,a...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.1_T2PreProcessing/applyMICO.py
.py
7,170
255
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/getIncidenceSize_par.py
.py
8,846
255
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import os,sys import nibabel as nii import glob import numpy as np import scipy.io as sc import scipy.ndimage as ndimage def find_nearest(array,value): idx = (np.abs(arra...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/getIncidenceMap.py
.py
4,056
107
import os import sys import nibabel as nii import glob import numpy as np import progressbar import matplotlib import matplotlib.pyplot as plt # --- Fonts & Text Display --- matplotlib.rcParams['svg.fonttype'] = 'none' #text remains editable in SVG matplotlib.rcParams['pdf.fonttype'] = 42 # Editable text i...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/changSNR.py
.py
1,856
69
""" Changs's method {chang2005automatic, title={An automatic method for estimating noise-induced signal variance in magnitude-reconstructed magnetic resonance images}, author={Chang, Lin-Ching and Rohde, Gustavo K and Pierpaoli, Carlo}, booktitle={Medical Imaging}, pages={1136--1142}, year={2005}, organization={Interna...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/brummerSNR.py
.py
1,682
59
""" Brummer's Method brummer1993automatic, title={Automatic detection of brain contours in MRI data sets}, author={Brummer, Marijn E and Mersereau, Russell M and Eisner, Robert L and Lewine, Richard RJ}, journal={IEEE Transactions on medical imaging}, volume={12}, number={2}, pages={153--166}, year={1993}, publisher={I...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/getIncidenceSize.py
.py
7,766
215
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import os,sys import nibabel as nii import glob import numpy as np import scipy.io as sc import scipy.ndimage as ndimage def thresholding(volumeMR,maskImg,thres,k): volumeM...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/sijbersSNR.py
.py
1,797
62
""""" Sijbers's method sijbers2007automatic, title={Automatic estimation of the noise variance from the histogram of a magnetic resonance image}, author={Sijbers, Jan and Poot, Dirk and den Dekker, Arnold J and Pintjens, Wouter}, journal={Physics in medicine and biology}, volume={52}, number={5}, pages={1335}, year={20...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.1_T2Processing/getSNR.py
.py
2,537
88
''' Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne ''' import os import changSNR as ch import brummerSNR as bm import sijbersSNR as sj import numpy as np import glob import nibabel as nii def snrCalclualtor(input_file): fileSNR ...
Python
3D
Aswendt-Lab/AIDAmri
bin/helper_tools/DistributeStrokeMasks.py
.py
2,937
64
import os import glob import argparse def main(inputPath): log_file_path = os.path.join(inputPath, "missing_files_log.txt") SearchPath = os.path.join(inputPath, "**", "anat", "*Stroke_mask.nii.gz") List_of_Stroke_rois = glob.glob(SearchPath, recursive=True) print(List_of_Stroke_rois) for ss in List...
Python
3D
Aswendt-Lab/AIDAmri
bin/helper_tools/reset_naming.py
.py
2,944
79
import os import argparse import glob import re if __name__ == "__main__": parser = argparse.ArgumentParser( description=( "This script prepares Bruker raw data before running " "1_PV2NIfTiConverter/pv_conv2Nifti.py. " "The raw data must follow the structure: projectfold...
Python
3D
Aswendt-Lab/AIDAmri
bin/helper_tools/MRI_files_summarizer.py
.py
1,999
54
import os import argparse import glob import pandas as pd if __name__ == "__main__": parser = argparse.ArgumentParser(description='This script processes NIfTI files in a directory. It extracts relevant parts of the file name and creates a DataFrame.') parser.add_argument('-i', '--input', required=True, help='P...
Python
3D
Aswendt-Lab/AIDAmri
bin/helper_tools/ReorientBatch.py
.py
13,057
430
#!/usr/bin/env python3 import os import sys import subprocess import shutil import traceback import argparse import numpy as np import nibabel as nib from nibabel import orientations as nio from typing import Optional """ Batch reorientation of NIfTI files within a BIDS-like directory structure. Usage: python R...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2_DTIConnectivity/dsi_tools.py
.py
17,129
426
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne Documentation preface, added 23/05/09 by Victor Vera Frazao: This document is currently in revision for improvement and fixing. Specifically changes are made to allow compatibility of ...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2_DTIConnectivity/plotDTI_mat.py
.py
3,742
127
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import matplotlib.pyplot as plt import os, sys import numpy as np import scipy.io as sio np.seterr(divide='ignore', invalid='ignore') import seaborn as sns def intersect_mtlb...
Python
3D
Aswendt-Lab/AIDAmri
bin/3.2_DTIConnectivity/dsi_main.py
.py
5,797
128
#!/opt/env/bin/python """ Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import argparse import os import glob import dsi_tools import shutil if __name__ == '__main__': # default dsi studi...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/__init__.py
.py
0
0
null
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/pv_parseBruker_md_np.py
.py
11,946
345
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import os,sys import numpy as np from dict2xml import createXML # from string import split def parsePV(filename): """ Parser fo...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/P2_IDLt2_mapping.py
.py
12,514
344
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import os from math import * from lmfit import Minimizer, Parameters import matplotlib.pyplot as plt import nibabel as nii import numpy as np import progressbar from .ReferenceMe...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/pv_conv2Nifti_bval_bvec.py
.py
15,938
386
""" Created on 10/08/2017 @author: Niklas Pallast, Markus Aswendt Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import os import time import re import sys import numpy as np import nibabel as nib import nibabel.nifti1 as nii import pv_...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/dict2xml.py
.py
2,466
92
""" Dictionary to XML - Library to convert a python dictionary to XML output Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com> Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz Revision 1.0 2007/12/15 11:57:20 Maurizio - First stable version """ __author__ = "Pianfetti Mau...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/pv_conv2Nifti.py
.py
15,954
386
""" Created on 10/08/2017 @author: Niklas Pallast, Marc Schneider, Markus Aswendt Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import os import time import re import sys import numpy as np import nibabel as nib import nibabel.nifti1 a...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/ReferenceMethods/__init__.py
.py
0
0
null
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/ReferenceMethods/changSNR.py
.py
1,961
83
""" Changs's method {chang2005automatic, title={An automatic method for estimating noise-induced signal variance in magnitude-reconstructed magnetic resonance images}, author={Chang, Lin-Ching and Rohde, Gustavo K and Pierpaoli, Carlo}, booktitle={Medical Imaging}, pages={1136--1142}, year={2005}, organization={Interna...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/ReferenceMethods/brummerSNR.py
.py
1,775
71
""" Brummer's Method brummer1993automatic, title={Automatic detection of brain contours in MRI data sets}, author={Brummer, Marijn E and Mersereau, Russell M and Eisner, Robert L and Lewine, Richard RJ}, journal={IEEE Transactions on medical imaging}, volume={12}, number={2}, pages={153--166}, year={1993}, publisher={I...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/ReferenceMethods/sijbersSNR.py
.py
1,872
75
""" Sijbers's method sijbers2007automatic, title={Automatic estimation of the noise variance from the histogram of a magnetic resonance image}, author={Sijbers, Jan and Poot, Dirk and den Dekker, Arnold J and Pintjens, Wouter}, journal={Physics in medicine and biology}, volume={52}, number={5}, pages={1335}, year={2007...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/ReferenceMethods/getSNR.py
.py
2,348
89
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import os, sys import changSNR as ch import brummerSNR as bm import sijbersSNR as sj import numpy as np import glob import nibabel as nii def snrCalclualtor(input_file, method...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/Alternative_pv_reader/pv_parser.py
.py
13,157
417
''' Created on 20.08.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Read Bruker ParaVision JCAMP parameter files (e.g. acqp, method, visu_pars). ''' from __future__ import print_function VERSION = 'pv_parser.py v 1.0.2 20200820' import re import sys import collections impo...
Python
3D
Aswendt-Lab/AIDAmri
bin/PV2NIfTiConverter/Alternative_pv_reader/pv_reader.py
.py
19,580
491
''' Created on 19.10.2020 Author: Michael Diedenhofen Max Planck Institute for Metabolism Research, Cologne Read Bruker ParaVision data (2dseq) and save as NIfTI file. Create a b-table text file with b-values and directions for diffusion data. ''' from __future__ import print_function try: zrange = xrange excep...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.2_DTIPreProcessing/registration_DTI.py
.py
21,386
441
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne Documentation preface, added 23/05/09 by Victor Vera Frazao: This document is currently in revision for improvement and fixing. Specifically changes are made to allow compatibility of...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.2_DTIPreProcessing/preProcessing_DTI.py
.py
6,660
196
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import nipype.interfaces.fsl as fsl import os, sys import nibabel as nii import numpy as np import applyMICO import cv2 from pathlib import Path import subprocess import shutil ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.2_DTIPreProcessing/anisodiff.py
.py
2,762
87
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import numpy as np import scipy.ndimage def applyFilter(im, num_iter, delta_t, kappa, option): # Convert input image to float. im.astype(float) # PDE(partial diffe...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.2_DTIPreProcessing/MICO.py
.py
2,915
120
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.2_DTIPreProcessing/applyMICO.py
.py
7,221
256
""" @Article{li2014multiplicative, author = {Li, Chunming and Gore, John C and Davatzikos, Christos}, title = {Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation}, journal = {Magnetic resonance imaging}, year = {2014}, volume = {32}, ...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.3_fMRIPreProcessing/preProcessing_fMRI.py
.py
6,607
185
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import nipype.interfaces.fsl as fsl import os,sys import nibabel as nii import numpy as np import nipype.interfaces.ants as ants from pathlib import Path import subprocess impor...
Python
3D
Aswendt-Lab/AIDAmri
bin/2.3_fMRIPreProcessing/registration_rsfMRI.py
.py
12,590
279
""" Created on 10/08/2017 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ import sys,os import glob import shutil as sh import subprocess import shlex def regABA2rsfMRI(inputVolume, T2data, brain_template, brain_anno, splitAnno, splitAnno_rsfMRI, anno...
Python
3D
Aswendt-Lab/AIDAmri
ARA/readXML_Lables.m
.m
392
8
function annotation50CHANGEDannolabelIDs = readXML_Lables(xml_file) %% Import the data [~, ~, annotation50CHANGEDannolabelIDs] = xlsread(xml_file); annotation50CHANGEDannolabelIDs = annotation50CHANGEDannolabelIDs(2:end,5); annotation50CHANGEDannolabelIDs = string(annotation50CHANGEDannolabelIDs); annotation50CHANGEDa...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/getParentalARA.m
.m
1,206
32
%% Method generate a atlas with all parental regions of the given xlsx file % getParentalARA('./annotation_label_IDs_valid.xlsx','./annotation/annotation.nii.gz') function getParentalARA(xml_file,atlasNii_file) addpath('./AllenBrainAPI-master/'); labelsStrArray = char(readXML_Lables(xml_file)); atlasData = load_nii(atl...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/download_ARA.py
.py
2,738
85
""" Created on 17/03/2020 @author: Niklas Pallast Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne More information can be found here: http://alleninstitute.github.io/AllenSDK/_modules/allensdk/api/queries/reference_space_api.html """ import os import nrrd # pip install pynrrd, if...
Python
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/findAllenExperiments.m
.m
2,762
103
function varargout = findAllenExperiments(varargin) % find all Allen experiments defined parameters % % function [IDs,json]=findAllenExperiments('param1','val1','param2','val2',...) % % % Inputs % 'injection' - search for experiments with injections in this location. not searched for by default. % this i...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/name2structureID.m
.m
1,653
72
function [IDs,ARA_LIST]=name2structureID(names,ARA_LIST,quiet) % Convert a list of ARA (Allen Reference Atlas) area names to a vector of structure IDs % % function [IDs,ARA_LIST]=name2structureID(names,ARA_LIST,quiet) % % Purpose % Each Allen Reference Atlas (ARA) brain area is associated with a unique % number (struct...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/structureID2name.m
.m
2,195
83
function [names,acronyms,ARA_LIST]=structureID2name(structIDs,ARA_LIST,quiet) % convert a list of ARA (Allen Reference Atlas) structure IDs to a cell array of names % % function [names,acronyms,ARA_LIST]=structureID2name(structIDs,ARA_LIST,quiet) % % Purpose % Each Allen Reference Atlas (ARA) brain area is associated w...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/DownloadImageSeries.m
.m
2,076
62
function DownloadImageSeries(outdir, expid, varargin) % download Allen sample brain using the Allen API % % function DownloadImageSeries(outdir, expid, varargin) % % % Inputs [required] % outdir - where to put the JPEGs % expid - [numerical scalar] experiment ID assigned by Allen % % Inputs [optional] % 'downsample' ...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/getProjectionDataFromExperiment.m
.m
2,762
95
function result = getProjectionDataFromExperiment(expID) % get projection data from Allen experiment ID % % function data = getProjectionDataFromExperiment(expID) % % Purpose % Get projection information from ARA sample brain(s) given one or more experiment IDs. % These can be searched for using findAllenExperiments % ...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/acronym2structureID.m
.m
1,722
72
function [IDs,ARA_LIST]=acronym2structureID(acronyms,ARA_LIST,quiet) % Convert a list of ARA (Allen Reference Atlas) acronyms to a vector of structure IDs % % function [IDs,ARA_LIST]=acronym2structureID(acronyms,ARA_LIST,quiet) % % Purpose % Each Allen Reference Atlas (ARA) brain area is associated with a unique % numb...
MATLAB
3D
Aswendt-Lab/AIDAmri
ARA/AllenBrainAPI-master/getInjectionIDfromExperiment.m
.m
2,188
71
function [IDs,names] = getInjectionIDfromExperiment(expIDs) % Download structure ID of the primary injection structure from an Allen experiment % % function IDs = getInjectionIDfromExperiment(expIDs) % % Purpose % Make an API query that downloads the structure id of the primary injection % structure of each experime...
MATLAB