GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aghaeifar/bet2: MATLAB mex interface and Python wrapper for standalone Brain Extraction Tool (bet2),

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
cprob
cprob
 
 
fslio
fslio
 
 
libcprob
libcprob
 
 
libprob
libprob
 
 
meshclass
meshclass
 
 
miscmaths
miscmaths
 
 
newimage
newimage
 
 
newmat
newmat
 
 
niftiio
niftiio
 
 
utils
utils
 
 
vtkzlib
vtkzlib
 
 
znzlib
znzlib
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.rst
README.rst
 
 
bet
bet
 
 
bet.tcl
bet.tcl
 
 
bet2.cpp
bet2.cpp
 
 
bet2_dll.cpp
bet2_dll.cpp
 
 
bet2_mex.cpp
bet2_mex.cpp
 
 
bet_proc.tcl
bet_proc.tcl
 
 
betsurf.cpp
betsurf.cpp
 
 
betsurf.h
betsurf.h
 
 
old_betall
old_betall
 
 
robustfov.cc
robustfov.cc
 
 

Repository files navigation

bet2

standalone Brain Extraction Tool (bet2) with python wrapper, released by http://fsl.fmrib.ox.ac.uk/

The following features are added:

  • The program is reconfigured using CMake
  • CMake configures MATLAB mex target as well.
  • Building static and dynamic library (dll or so) of BET
  • Support Windows and Linux

To build:

git clone https://github.com/aghaeifar/bet2.git
cd bet2
mkdir build
cd build
cmake ..
make -j4

To use MATLAB mex interface:

bet2_mex(input)

where input is a 3D single real array.

To use in Python:

import ctypes
handle = ctypes.CDLL(os.path.join(dir_path, "lib", "libbet2.so"))
handle.runBET.argtypes = [np.ctypeslib.ndpointer(np.float32, ndim=self.img_mag.ndim, flags='F'),
                np.ctypeslib.ndpointer(np.float32, ndim=len(mask_size), flags='F'),
                ctypes.c_int, ctypes.c_int, ctypes.c_int]
mask_size = mag.shape
mag = self.img_mag.copy(order='F')
mask = np.zeros(mask_size, dtype=mag.dtype, order='F')
handle.runBET(mag, mask, *mask_size)

where input is a 3D float32 real numpy array.

Precompiled mex files for Windows and Linux can be downloaded in the repository releases.

About

MATLAB mex interface and Python wrapper for standalone Brain Extraction Tool (bet2),

fsl.fmrib.ox.ac.uk

Topics

bet2brain-extraction

Resources

Readme
License
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.