Skip to content

Commit

Permalink
Merge pull request #148 from jhlegarreta/UseOriginalFileFormatInPrepr…
Browse files Browse the repository at this point in the history
…ocess

ENH: Keep the input file format in preprocessing script
  • Loading branch information
ljod committed Oct 19, 2023
2 parents b3908da + fadb777 commit 83c6e0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/wm_preprocess_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import argparse
import multiprocessing
from pathlib import Path

import whitematteranalysis as wma

Expand Down Expand Up @@ -171,7 +172,9 @@ def pipeline(inputPolyDatas, sidx, args):
msg = "**Writing output data for subject:", subjectID
print(id_msg, msg)

fname = os.path.join(args.outputDirectory, subjectID+'_pp.vtp')
ext = Path(inputPolyDatas[sidx]).suffixes[0][1:]
fname = os.path.join(args.outputDirectory, subjectID+'_pp'+'.'+ext)

try:
print("Writing output polydata", fname, "...")
wma.io.write_polydata(wm3, fname)
Expand Down

0 comments on commit 83c6e0f

Please sign in to comment.