Example #1
0
def _imageFromOrientationMap(menuitem, microstructure, imagename, colorscheme):
    ms = ooflib.common.microstructure.microStructures[microstructure]
    orientdata = orientmapdata.getOrientationMap(ms.getObject())
    immidge = orientdata.createImage(imagename, colorscheme)  # OOFImage object
    immidge.setSize(ms.getObject().size())
    immidge.setMicrostructure(ms.getObject())
    imagemenu.loadImageIntoMS(immidge, microstructure)
Example #2
0
def _imageFromOrientationMap(menuitem, microstructure, imagename, colorscheme):
    ms = ooflib.common.microstructure.microStructures[microstructure]
    orientdata = orientmapdata.getOrientationMap(ms.getObject())
    immidge = orientdata.createImage(imagename, colorscheme) # OOFImage object
    immidge.setSize(ms.getObject().size())
    immidge.setMicrostructure(ms.getObject())
    imagemenu.loadImageIntoMS(immidge, microstructure)
    switchboard.notify("redraw")
Example #3
0
def _newImage(menuitem, name, microstructure, pixels):
    ms = \
        ooflib.common.microstructure.microStructures[microstructure].getObject()
    # TODO OPT: reading pixels in is very slow
    image = oofimage.newImageFromData(name, ms.size(), ms.sizeInPixels(),
                                      pixels.values())
    image.setSize(ms.size())
    imagemenu.loadImageIntoMS(image, microstructure)
Example #4
0
def _newImage(menuitem, name, microstructure, pixels):
    ms = ooflib.common.microstructure.microStructures[microstructure].getObject()
    image = oofimage.newImageFromData(name, ms.sizeInPixels(), pixels.values())
    image.setSize(ms.size())
    imagemenu.loadImageIntoMS(image, microstructure)