python图像序列(pims)查看器。

pimsviewer的Python项目详细描述


#皮姆斯维耶尔
[![水蟒服务器徽章](https://Anaconda.org/conda forge/PIMS viewer/badges/version.svg)](https://Anaconda.org/conda forge/pimsviewer)


PIMS的图形用户界面(GUI)(下面的屏幕截图)

此查看器基于“skimage.viewer.CollectionViewer”([文档](http://scikit image.org/docs/dev/user\guide/viewer.html))
能够处理PIMS打开的N维图像文件。

利用“插件”基础设施。pimsviewer的安装可以使用conda:














安装后查看器中有一个可执行文件“pimsviewer”。只需通过终端/命令行界面运行命令。
也可以指定读卡器。`pimsviewer--help`将列出所有已安装的读卡器例如:

````
$pimsviewer--help
用法:pimsviewer[OPTIONS][FILE]

OPTIONS:
--reader类[ImageSequencend norpixseq spestack tiffstack tiffstack pil moviepripereader imagereadernd readreadernd readernd readreadernd reader tiffSeries tiffstack生物格式阅读器pyavreadertimed pyavreaderreaderindex pyavreaderreaderreaderindex mm tiffstack ima读者framessesequequenceque]
打开文件的读取器。
使用Python中的查看器.BR/>,可以使用Python脚本中的查看器如下:
BR/>‘BR/>从PimsVIEW导入查看器BR/>查看器= VIEWER():显示())BR/> ` BR/>可选地,你可以包括一个读者:
BR/> ` BR/>导入PIMS
pims viewer import viewer
viewer=viewer(pims.open('path/to/file')
viewer.show()
````

噪声量可通过一个滑块进行调整,该滑块显示在图像窗口右侧。

`````
import numpy as np
import pims
from pims Viewer import Viewer,ProcessPlugin,slider

reader=pims.open('path/to/file')

def add_noise(img,noise_level):
返回img+np.random.random(img.shape)*噪声级/100*img.max()

AddNoise=ProcessPlugin(添加噪声,“添加噪声”,dock='right')
AddNoise+=滑块(“噪声级”,low=0,high=100,value=10,
orientation=“vertical”)
viewer=viewer(reader)+addnoise
viewer.show()
````

annotateplugin
reader=pims.open('path/to/file')
f=tp.batch(reader,diameter=15)
(viewer(reader)+annotateplugin(f)).show()
````

并返回调整后的数据帧。

```
从pims Viewer导入查看器将trackpy导入为tp
,SelectionPlugin
reader=pims.open('path/to/file')
f=tp.batch(reader,diameter=15)
f=tp.link\u df(f搜索范围=10)
viewer=viewer(读卡器)+selectionplugin(f)
f戋result=viewer.show()
`````

`````
;示例:设计自定义绘图函数
这将动态显示“tp.locate”的效果。

````
从pimsviewer导入查看器导入trackpy作为tp
,slider,plottingplugin

def locate戋and戋plot(图像,半径,最小质量,间隔,ax):
f=tp.定位(图像,直径=半径*2+1,最小质量=最小质量,
分离=分离)
如果len(f)==0:
返回
返回ax.plot(f['x',f['y',markersize=15,markeredgewidth=2,
markerfacecolor='none',markeredgecolor='r',
marker='o',linestyle='none')

locate=plottingplugin(locate_and_plot,'locate',dock='right')
locate+=slider('radius',2,20,7,value_type='int',orientation='vertical')
locate+=slider('separation',1,100,7,value_type='float',orientation='vertical')
locate+=slider('minmass',1,10000,100,value_type='int',orientation='vertical')
viewer=viewer(reader)+定位
viewer.show()
`````

[截图](/screenshot.png?原始=真)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带Maven的Eclipse Java存储库:缺少工件:compile   java如何以编程方式停止RMI服务器并通知所有客户端   java Roboguice抛出ClassNotFoundException:AnnotationDatabaseImpl   java为什么lucene 4.0删除IndexWriter类的两个构造函数?   nls如何避免java项目上不需要的日志消息?   测试无法在Selenium Webdriver(java)中定位iframe   使用XML的java servlet   java如何使用jxl用****屏蔽单元格   java使用SQLite从数据库中选择“没有这样的列”   导入扫描程序后出现java编译错误   插入查询的java空指针异常   使用创建PostgreSQL数据库。Java应用中的sql脚本   java使用jsoup将HTML解析为格式化的明文