Skip to content

Refactor CIFTI bold -> label subcortical resampling #434

Open
@mgxd

Description

@mgxd

I believe here's where you sample the subcortical structures from the BOLD data. Now that we have learned so much from nitransforms, you can do this step without the resampling above.

The pseudocode would be:

ijk_labels = np.where(label_data > 0)  # I don't remember if you need to set an upper bound threshold
ijk_bold = np.linalg.inv(bold_img.affine).dot(label_img.affine.dot(ijk_labels))  # You'll need to take care of ijk_labels, add a ones column and probably transpose here.
bold_values = scipy.ndimage.map_coordinates(bold_data, ijk_bold, order=3)

Originally posted by @oesteban in #417

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions