ChristophKirst / ClearMap

ClearMap is a python toolbox for the analysis and registration of volumetric data from cleared tissues.
http://christophkirst.github.io/ClearMap/build/html/index.html
GNU General Public License v3.0
49 stars 40 forks source link

FilterKernel.filterKernel2D too many indices for array ? #14

Closed vzickus closed 6 years ago

vzickus commented 6 years ago

L92-93 in filterKernel2D

Was it meant to be this:

x = g[0,:,:] + add[0]; y = g[1,:,:] + add[1];

?

jmmanley commented 6 years ago

Hi! I agree, your correction fixes an error I also receive in the original code. It also looks like it should apply for all values of ftype in filterKernel2D. Perhaps you could submit a pull request?

vzickus commented 6 years ago

Will do later today and then close.

vzickus commented 6 years ago

Pull request created.

1) filterKernel2D ftypes had indices assuming a 3D filter.

2) ftype== 'log' in filterKernel2D and filterKernel3D was missing radius test:

 if radius == None:
        radius = mo;
        radius = numpy.array(radius);

Closing.