ConvertDICMToAVI
1995Emma opened this issue · 1 comments
1995Emma commented
Thank you for the code, but I have two questions about the preprocessing code.
1.yCrop = np.where(mean<1)[0][0]
in code #2,why the mean<1, what is the reason for chossing 1 instead of other numbers?
2.What is the function difference between #1 and #2?
code#1smallOutput = outputA[int(height/10):(height - int(height/10)), int(height/10):(height - int(height/10))]
code#2 ```
frame0 = testarray[0]
mean = np.mean(frame0, axis=1)
mean = np.mean(mean, axis=1)
yCrop = np.where(mean<1)[0][0]
testarray = testarray[:, yCrop:, :, :]
bias = int(np.abs(testarray.shape[2] - testarray.shape[1])/2)
if bias>0:
if testarray.shape[1] < testarray.shape[2]:
testarray = testarray[:, :, bias:-bias, :]
else:
testarray = testarray[:, bias:-bias, :, :]
milktea-1 commented
i used mean<1 on my dataset not work