io.writeData(os.path.join(resultDir, fName + '_CellShapes.tif'), 255 * dataShape.astype('int32') / dataShape.max()) #cintensity = findIntensity(imgD, points); #points, intensities = thresholdPoints(points,cintensity, threshold = (5,20), row = (1,1)); points, cellSizesPost = thresholdPoints(points, cellSizesPre, threshold=pointsThresh, row=threshType) #pdb.set_trace() #io.writeData(os.path.join(homeDir, 'Results/OverlayWatershed.tif'), overlay_Img); overlay_Img = plt.fredOverlayPoints(cfos_fn, points, pointColor=[200, 0, 0]) io.writeData(os.path.join(resultDir, fName + '_PointsOriginalImg.tif'), overlay_Img) overlay_Img = plt.overlayPoints(imgD, points, pointColor=[200, 0, 0]) io.writeData(os.path.join(resultDir, fName + '_PointsFilterDoG.tif'), overlay_Img) #Convert points from 3d to 2d points = numpy.delete(points, 2, axis=1) io.writePoints(points_fn, points) ##############################################################333 imgR = io.readData(auto_fn)
cellSizesPre = findCellSize(dataShape, maxlabel=points.shape[0]) io.writeData(os.path.join(homeDir, 'Results/CellShapes.tif'), 20 * dataShape.astype('int32')) #cintensity = findIntensity(imgD, points); #points, intensities = thresholdPoints(points,cintensity, threshold = (5,20), row = (1,1)); points, cellSizesPost = thresholdPoints(points, cellSizesPre, threshold=(5, 100), row=(3, 3)) #pdb.set_trace() #io.writeData(os.path.join(homeDir, 'Results/OverlayWatershed.tif'), overlay_Img); overlay_Img = plt.fredOverlayPoints(input_fn, points, pointColor=[200, 0, 0]) io.writeData(os.path.join(homeDir, 'Results/PointsOriginalImg.tif'), overlay_Img) overlay_Img = plt.fredOverlayPoints(os.path.join(homeDir, 'Results/FilterDoG.tif'), points, pointColor=[200, 0, 0]) io.writeData(os.path.join(homeDir, 'Results/PointsFilterDoG.tif'), overlay_Img) ################################################################################################# #Convert points from 3d to 2d points = numpy.delete(points, 2, axis=1) io.writePoints(points_fn, points) #Resampled Img imgR = io.readData(auto_fn)