Пример #1
0
 def test_viewer_processplugin_multiple(self):
     AddNoise = ProcessPlugin(add_noise, 'Add noise', dock='right') + \
        Slider('noise_level', 0, 100, 0, orientation='vertical')
     Reduce = ProcessPlugin(make_black_y, 'Make black', dock='left') + \
                    Slider('x', 0, 128, 0, value_type='int', orientation='vertical')
     viewer = Viewer(RandomReader(shape=(128, 128, 3))) + AddNoise + Reduce
     viewer.show()
Пример #2
0
 def test_viewer_interactive_plotting(self):
     Locate = PlottingPlugin(tp_locate, 'Locate', dock='right') + \
        Slider('radius', 1, 20, 7, value_type='int', orientation='vertical') + \
        Slider('separation', 1, 20, 7, value_type='float', orientation='vertical') + \
        Slider('noise_size', 1, 20, 1, value_type='int', orientation='vertical') + \
        Slider('minmass', 1, 10000, 100, value_type='int', orientation='vertical')
     viewer = Viewer(RandomReader(shape=(128, 128))) + Locate
     viewer.show()
Пример #3
0
import trackpy as tp
from os import path
from pimsviewer import Viewer, AnnotatePlugin
from pims import pipeline

@pipeline
def as_grey(frame):
    return 0.2125 * frame[:, :, 0] + 0.7154 * frame[:, :, 1] + 0.0721 * frame[:, :, 2]

filename = path.join(path.dirname(path.realpath(__file__)), '../screenshot.png')

viewer = Viewer(filename)

f = tp.batch(as_grey(viewer.reader), diameter=15)
plugin = AnnotatePlugin(viewer, f)

viewer.run()
Пример #4
0
try:
    from nd2reader import ND2Reader
except ImportError(ND2Reader):
    pass

from pimsviewer import Viewer

viewer = Viewer()
viewer.show()
Пример #5
0
def run(filename):
    app = Viewer(filename)
    app.run()
Пример #6
0
 def test_viewer_3d_multichannel(self):
     viewer = Viewer(RandomReader(shape=(3, 10, 128, 128)))
     viewer.show()
Пример #7
0
 def test_viewer_3d_rgb(self):
     viewer = Viewer(RandomReader(shape=(10, 128, 128, 3)))
     viewer.show()
Пример #8
0
 def test_viewer_2d(self):
     viewer = Viewer(RandomReader(shape=(128, 128)))
     viewer.show()
Пример #9
0
 def test_viewer_noreader(self):
     viewer = Viewer()
     viewer.show()
Пример #10
0
 def test_viewer_annotate_3d(self):
     f = pd.DataFrame(np.random.random((3000, 3)) * np.array([100, 100, 30]) + 10, columns=['x', 'y', 'z'])
     f['frame'] = np.repeat(np.arange(10), 300)
     f['particle'] = np.tile(np.arange(300), 10)
     (Viewer(RandomReader(shape=(50, 128, 128))) + AnnotatePlugin(f)).show()
Пример #11
0
 def test_viewer_annotate_mp(self):
     f = pd.DataFrame(np.random.random((300, 2)) * 100 + 10, columns=['x', 'y'])
     f['frame'] = np.repeat(np.arange(30), 10)
     f['particle'] = np.tile(np.arange(10), 30)
     (Viewer(RandomReader(shape=(128, 128, 3))) + AnnotatePlugin(f, frame_axes='tc')).show()
Пример #12
0
 def test_viewer_processplugin(self):
     AddNoise = ProcessPlugin(add_noise, 'Add noise', dock='right') + \
        Slider('noise_level', 0, 100, 0, orientation='vertical')
     viewer = Viewer(RandomReader()) + AddNoise
     viewer.show()
Пример #13
0
from pimsviewer import Viewer

viewer = Viewer()
viewer.run()