Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson committed Jun 10, 2020
1 parent 140f06b commit 768e261
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions neuro/segmentation/paths.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pathlib import Path
from imlib.general.system import ensure_directory_exists

from neuro.atlas_tools import paths as reg_paths

Expand All @@ -11,26 +11,35 @@ class Paths:
"""

def __init__(self, registration_output_folder, downsampled_image):
self.registration_output_folder = Path(registration_output_folder)
self.downsampled_image = self.join(downsampled_image)
self.registration_output_folder = registration_output_folder

self.tmp__inverse_transformed_image = self.join(
self.segmentation_directory = (
self.registration_output_folder / "manual_segmentation"
)

ensure_directory_exists(self.segmentation_directory)
self.downsampled_image = self.join_seg_files(downsampled_image)

self.tmp__inverse_transformed_image = self.join_seg_files(
"image_standard_space.nii"
)
self.tmp__inverse_transform_log_path = self.join(
self.tmp__inverse_transform_log_path = self.join_seg_files(
"inverse_transform_log.txt"
)
self.tmp__inverse_transform_error_path = self.join(
self.tmp__inverse_transform_error_path = self.join_seg_files(
"inverse_transform_error.txt"
)

self.annotations = self.join(reg_paths.ANNOTATIONS)
self.hemispheres = self.join(reg_paths.HEMISPHERES)
self.annotations = self.join_reg_files(reg_paths.ANNOTATIONS)
self.hemispheres = self.join_reg_files(reg_paths.HEMISPHERES)

self.regions_directory = self.join("regions")
self.regions_directory = self.join_seg_files("regions")
self.region_summary_csv = self.regions_directory / "summary.csv"

self.tracks_directory = self.join("tracks")
self.tracks_directory = self.join_seg_files("tracks")

def join(self, filename):
def join_reg_files(self, filename):
return self.registration_output_folder / filename

def join_seg_files(self, filename):
return self.segmentation_directory / filename

0 comments on commit 768e261

Please sign in to comment.