Open neurodroid opened 9 years ago
Thanks for this bug report of exemplary clarity.
The extract method has a remove_overlap argument that defaults to True, causing it to remove all overlapping pixels are common to more than one ROI. In the case of mask ROIs, which have values for all pixels, this removes everything.
The error goes away if you change the value of this argument to be False:
signals = dataset.extract(stica_rois, signal_channel='green', label='green_signal_stica', remove_overlap=False)
@jzaremba @nbdanielson Would you object to changing the default value for remove_overlap to be False?
I'm somewhat hesitant to change the default behavior, not removing overlapping pixels can actually have a fairly substantial effect on your signals if you expected them to have been removed.
That being said, I'm not sure you'd ever want to remove overlapping pixels for non-boolean masks. We could just disable that ability entirely and throw a warning if you try it?
That being said, I'm not sure you'd ever want to remove overlapping pixels for non-boolean masks. We could just disable that ability entirely and throw a warning if you try it?
+1
Weighted ROIs, as returned by
sima.segment.STICA
, cannot be used for signal extraction. Using r178576528. Minimal standalone sample to reproduce the issue:Relevant messages: