Skip to content
Discussion options

You must be logged in to vote

Hi @crossmanith, thanks for your interest here.

The bounding box generated is likely configured to use an exclusive end index, which is a common approach in Python. This means that for an array of size N, the indices would actually start at 0 and end at N-1 for inclusive indexing.

Given your example, where you have non-empty sagittal slices ranging from slice 3 (inclusive) to slice 187 (inclusive), the bounding box is correctly starting at 3. The end index being 188 is also correct if we're considering exclusive indexing because 188 would be the first empty slice after your filled data. This 188 is an exclusive index, so that index is not included. It's the index "up to but not including"…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@crossmanith
Comment options

Answer selected by crossmanith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants