petersaj / AP_histology

Histology processing
61 stars 21 forks source link

Code error "Expected input number 2, ANGLE, to be real. #4

Closed AdaQianLI closed 3 years ago

AdaQianLI commented 3 years ago

The angle_diff matrix being generated by function "AP_rotate_histology" is not in real value, which brings the error when processing the function "imrotate: Error using imrotate Expected input number 2, ANGLE, to be real. Can I kindly ask any setting mistake did I make? Or is the angle being generated in the wrong unit? Thanks in advance!

petersaj commented 3 years ago

Hi - to check: does this mean the reference line you're using is horizontal? Looks like it can't do that at the moment (it assumes vertical) but I can update it. Out of curiosity, what horizontal reference line can you get consistently?

AdaQianLI commented 3 years ago

Got you. I guess it's because I orient my coronal slice in vertical when taking picture and get the the reference line in horizontal. If so, is it an easy solution to rotate my figure in 90 degree first?

petersaj commented 3 years ago

I just pushed a fix that lets you use a reference line in any orientation, want to check and see if that works?

(or if your slices are rotated 90 deg from where you want them, probably easiest if you're on windows is to select all the slice images in explorer, right click and hit 'rotate left/right')

AdaQianLI commented 3 years ago

Would love to! Where to check out the new fix? Thanks in advance!

petersaj commented 3 years ago

You can just pull the updated repo however you use github and then try the function again