Skip to content

Commit

Permalink
Merge pull request #411 from Deep-MI/parc
Browse files Browse the repository at this point in the history
use nibabel read_geometry
  • Loading branch information
m-reuter committed Dec 8, 2023
2 parents be6afb2 + f31e3f1 commit c015316
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions recon_surf/rewrite_mc_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import optparse
import nibabel.freesurfer.io as fs
from nibabel import load as nibload
from lapy._read_geometry import read_geometry


def options_parse():
Expand Down Expand Up @@ -69,7 +68,7 @@ def resafe_surface(insurf: str, outsurf: str, pretess: str) -> None:
Path and name of file the input surface was created on (e.g. filled-pretess127.mgz)
"""
surf = read_geometry(insurf, read_metadata=True)
surf = fs.read_geometry(insurf, read_metadata=True)

if not surf[2]["filename"]:
# Set information with file used for surface construction (volume info and name)
Expand Down
3 changes: 1 addition & 2 deletions recon_surf/smooth_aparc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import numpy as np
from numpy import typing as npt
import nibabel.freesurfer.io as fs
from lapy._read_geometry import read_geometry
from scipy import sparse


Expand Down Expand Up @@ -269,7 +268,7 @@ def smooth_aparc(
"""
# read input files
print("Reading in surface: {} ...".format(insurfname))
surf = read_geometry(insurfname, read_metadata=True)
surf = fs.read_geometry(insurfname, read_metadata=True)
print("Reading in annotation: {} ...".format(inaparcname))
aparc = fs.read_annot(inaparcname)
print("Reading in cortex label: {} ...".format(incortexname))
Expand Down
3 changes: 1 addition & 2 deletions recon_surf/spherically_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import math
from lapy.diffGeo import tria_mean_curvature_flow
from lapy.triaMesh import TriaMesh
from lapy.read_geometry import read_geometry
from lapy.solver import Solver

HELPTEXT = """
Expand Down Expand Up @@ -320,7 +319,7 @@ def spherically_project_surface(
Try to use the Cholesky decomposition from the cholmod. Defaults to True
"""
surf = read_geometry(insurf, read_metadata=True)
surf = fs.read_geometry(insurf, read_metadata=True)
projected = tria_spherical_project(
TriaMesh(surf[0], surf[1]), flow_iter=3, use_cholmod=use_cholmod
)
Expand Down

0 comments on commit c015316

Please sign in to comment.