nat icon indicating copy to clipboard operation
nat copied to clipboard

teach xform to scale neuron diameter when appropriate

Open jefferis opened this issue 6 years ago • 5 comments

Although neurons can easily be scaled with both points/radius information xform and friends (e.g. xform_brain currently can only transform point locations.

jefferis avatar Feb 19 '19 12:02 jefferis

My first thought was that including a function in a reglist object would solve this. But that doesn't work because xform eventually hands off to xformpoints and that only deals with 3D point information.

jefferis avatar Feb 19 '19 12:02 jefferis

My next thought was to provide a specialised xform.neuron method and to have that intercept the case when reg is a function (see 2993a4b2291c8cadda295eeef85db53de3e71e43). That sort of works, but fails when reg is actually a reglist object (one of whose elements is a function).

jefferis avatar Feb 19 '19 12:02 jefferis

Adding further specialised logic to xform.neuron to handle reglist type registrations by peeking inside them feels very inelegant.

jefferis avatar Feb 19 '19 12:02 jefferis

Perhaps one could add xformneuron.reglist and have that sort out the logic applying transforms. But that's actually pretty close to what I just mentioned and would largely duplicate xformpoints.reglist.

jefferis avatar Feb 19 '19 12:02 jefferis

Maybe we need a different class of transform that signals that it can be applied to Nx4 points and will scale diameters accordingly. But that still implies that we need some logic to inspect a reglist and decide what to do.

jefferis avatar Feb 19 '19 13:02 jefferis