tee-ar-ex / tee-ar-ex/trx-python

strange behavior for `intersection`

Open
#77 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
26
Forks
20
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Hi @frheault and trx team,

I was working on the migration of validate_tractogram to DIPY (trying to understand the logic) and it seems that the option remove_identical_streamlines is not working as expected.

Looking deeper, it seems that intersection ignore flipped streamline. here an exemple:

arr = np.arange(90).reshape((30, 3))
stream = [np.flipud(arr), arr]
stream2 = [arr + 1, np.flipud(arr) + 1]

res, indices_uniq = perform_streamlines_operation(intersection, [stream, stream2])

I was expecting some results but I got ([], array([], dtype=uint32))

I do not understand anymore why I got a result when I do res, indices_uniq = perform_streamlines_operation(intersection, [stream])

Why the input should be a list of tractogram and not just one tractogram? (concatenate tractogram could be use if people want multiple tractogram in one).

Thank you in advance for the clarification

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the snippet with perform_streamlines_operation and intersection, then inspect how the operation handles one versus multiple tractograms and flipped streamlines. Done means the expected behavior is established and the implementation or its tests consistently reflect that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.