pyqtgraph-两个ROI的同步大小更改

时间:2018-07-20 07:43:28

标签: python-2.7 pyqtgraph

我写了一些脚本,在图像上使用两个圆圈的ROI。我需要同步更改ROI的大小。因此,当我更改一个ROI时,我希望在第二个ROI上进行相同的更改。 有什么建议吗?

import numpy as np

import pandas as pd

from sklearn.feature_extraction.text import CountVectorizer

ExDF_swap = ExDF["Swap"] = ExDF["Name"].apply(lambda x: " ".join(reversed(x.split()))) 
SnDF_swap = SnDF["Swap"] = SnDF["Name"].apply(lambda x: " ".join(reversed(x.split()))) 
ExDF_swap =  pd.DataFrame(ExDF_swap)
SnDF_swap =  pd.DataFrame(SnDF_swap)

vect = CountVectorizer()
X = vect.fit_transform(ExDF_swap.Name)
Y = vect.transform(SnDF_swap.Name)

res = np.ravel(np.any((X.dot(Y.T) > 1).todense(), axis=1))
pd.DataFrame(X.toarray(), columns=vect.get_feature_names())
pd.DataFrame(Y.toarray(), columns=vect.get_feature_names())

ExDF["Flag"] = np.ravel(np.any((X.dot(Y.T) > 1).todense(), axis=1))
SnDF["Flag"] = np.ravel(np.any((X.dot(Y.T) > 1).todense(), axis=1))

0 个答案:

没有答案