This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyramid_view_controller import view_controller | |
from ..models import Building, House, Factory, Skyscraper | |
class AbstractController(object): | |
# will not become a view because the class has no @view_controller decorator | |
@view_controller(name='view') | |
def view(self): | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cpscript | |
from scipy import ndimage | |
# either ask explicitely for an object | |
labels = cpscript.objects['Cells'].segmented | |
# or ask the user to choose one | |
# cpscript.objects.input_objects.require('The objects from which to measure the distance') | |
#labels = cpscript.objects.input_objects.segmented | |
background_labels = np.array(labels == 0, dtype=int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruN cellprofiler.orig/gui/moduleview.py cellprofiler/gui/moduleview.py | |
--- cellprofiler.orig/gui/moduleview.py 2012-01-13 10:01:00.632279000 +0100 | |
+++ cellprofiler/gui/moduleview.py 2012-01-12 11:29:23.125876000 +0100 | |
@@ -1066,6 +1066,9 @@ | |
style = 0 | |
if getattr(v, "multiline_display", False): | |
style = wx.TE_MULTILINE|wx.TE_PROCESS_ENTER | |
+ size = wx.DefaultSize | |
+ if getattr(v, "display_size", None) is not None: | |
+ size = wx.Size(v.display_size[0], v.display_size[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy import ndimage | |
labels = Cells.segmented | |
background_labels = np.array(labels == 0, dtype=int) | |
dt_labels = ndimage.distance_transform_edt(background_labels) | |
imVSVG_pixels = imVSVG.pixel_data | |
imVSVG_dt_pixels = imVSVG_pixels * dt_labels | |
imVSVG_dr_pixels = imVSVG_pixels / dt_labels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RunScript:[module_num:23|svn_version:\'Unknown\'|variable_revision_number:1|show_window:False|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)] | |
Input image count:1 | |
input object count:1 | |
Input measurement count:0 | |
Input constant count:0 | |
Output image count:3 | |
Output object count:0 | |
Output measurement count:0 | |
Run script in debug mode?:No | |
Load script script from a file?:Yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''<b>RunScript</b> - an easy way to write scripts for CellProfiler | |
<hr> | |
This module allows you to write small python scripts that are run as part | |
of the CellProfiler pipeline. | |
''' | |
################################# | |
# | |
# Imports from useful Python libraries | |
# | |
################################# |