Skip to content

Commit

Permalink
Merge pull request #108 from aditiiyer/testing
Browse files Browse the repository at this point in the history
Reorder feature vals in column-first order
aditiiyer authored Dec 31, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 53c0bdc + 088a619 commit 4e00ddc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cerr/mri_metrics/dce_mri.py
Original file line number Diff line number Diff line change
@@ -363,7 +363,6 @@ def createFeatureMaps(featureList, strNum, planC, importFlag=False):

# Extract list of available features
feats = featureList[0].keys()
numFeats = len(feats)
numRow, numCol, numSlc = mask3M.shape

mapDict = {f"{key}": np.zeros_like(mask3M, dtype=float) for key in feats}
@@ -372,8 +371,14 @@ def createFeatureMaps(featureList, strNum, planC, importFlag=False):
for key in feats:
for s in range(numSlc):
maskSlcM = mask3M[:, :, s]
mapDict[key][...,s][maskSlcM] = featureList[s][key]
# Import as pseudo-scan array
rowIdxV, colIdxV = np.where(maskSlcM)
colFirstIdxV = np.lexsort((rowIdxV, colIdxV))

# Reorder feature vals in column-first order
featValV = featureList[s][key][colFirstIdxV]
mapDict[key][...,s][maskSlcM] = featValV

# Import as pseudo-scan array
if importFlag:
planC = pc.importScanArray(mapDict[key], xV, yV, zV, key, assocScan, planC)

0 comments on commit 4e00ddc

Please sign in to comment.