本文整理汇总了Python中Control.imageViewGenerator方法的典型用法代码示例。如果您正苦于以下问题:Python Control.imageViewGenerator方法的具体用法?Python Control.imageViewGenerator怎么用?Python Control.imageViewGenerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control.imageViewGenerator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createBasisViewer
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imageViewGenerator [as 别名]
def createBasisViewer(basisDirectory, htmlPath, Reducer, QLSA):
try:
os.mkdir(basisDirectory)
except:
print "Error Creating folder"
return Control.imageViewGenerator(
Reducer.reduction.basisM.max(), Reducer.reduction.basisM.min(), basisDirectory, htmlPath, 19, True, QLSA
)
示例2: createReconstructionViewer
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imageViewGenerator [as 别名]
def createReconstructionViewer(imagesDirectory, htmlPath, Reducer, QLSA):
try:
os.mkdir(imagesDirectory)
except:
print "Error Creating folder"
return Control.imageViewGenerator(
Reducer.reduction.reconstructed.max(),
Reducer.reduction.reconstructed.min(),
imagesDirectory,
htmlPath,
19,
True,
QLSA,
)
示例3: range
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imageViewGenerator [as 别名]
import Control
I = '/home/tuareg/Documents/UNAL/7mo semestre/Machine Learning 2/TMP/datasets/ORLFull'
M,L = Control.imagesMatrix(I)
M = Control.quantumNormalize(M)
quantumImagesDirectory = '/home/tuareg/Documents/UNAL/7mo semestre/Machine Learning 2/TMP/datasets/ORLFullQuantumNormalized/'
imageGenerator = Control.imageViewGenerator(M.max(),M.min(),quantumImagesDirectory,quantumImagesDirectory,112,True)
for i in range(M.shape[1]):
imageGenerator.toImage(M[:,i],L[i])
示例4:
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imageViewGenerator [as 别名]
import nibabel as nib
import Control
img = nib.load("../../../datasets/oasis/OAS1_0227_MR1_mpr_n4_anon_111_t88_masked_gfc.hdr").get_data()[:,:,:,0]
imagesDirectory = "./"
height =176
index = 100
im = img[:,100,:]
imgViewer = Control.imageViewGenerator(im.max(),0,imagesDirectory,imagesDirectory,height,False)
imgViewer.toImage(im.reshape(1,-1),"f"+str(index))