Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The inderence only works with isometric pixel spacing #4

Open
mariamonzon opened this issue Nov 25, 2023 · 0 comments
Open

The inderence only works with isometric pixel spacing #4

mariamonzon opened this issue Nov 25, 2023 · 0 comments

Comments

@mariamonzon
Copy link

In the tutorial page thre is an example of NIFTI predictions whre the pixel spacing is
sx, sy, sz = image.header.get_zooms() # get pixel spacings

However when calling the detection function is specified as
vert_dicts = spnt.detect_vb(scan.volume, scan.pixel_spacing[0])

In the case tat would like to use the both pixel spacing the function detect_vb throus an error, despite in teh definition in theory allow .
def detect_vb(
self,
volume : np.ndarray,
pixel_spacing : Union[np.ndarray, List[float], torch.Tensor],
debug: bool = False,
penalise_skips: bool = True,
remove_single_slice_detections: bool = True,
) -> VertDicts:
"""
Use SpineNet to detect and label vertebral bodies in a volume.

    Parameters
    ----------
    volume : np.ndarray
        The volume to detect vertebrae in. Should have shape (height,width, number of sagittal slices).
    pixel_spacing : Union[np.ndarray, List[float], torch.Tensor]
        The pixel spacing of the volume, specifically the distance between adjacent pixels in the sagittal direction.
        This has order height, width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant