Put together an image.  Defined by a list of layers with RGBA colors

        Make the schema example
        
        |    schema = [
        |        {'subset_logic':SL(phenotypes=['SOX10+']),
        |         'edge_color':(31, 31, 46,255),
        |         'watershed_steps':0,
        |         'fill_color':(51, 51, 77,255)
        |        },
        |        {'subset_logic':SL(phenotypes=['CD8+'],scored_calls={'PD1':'+'}),
        |         'edge_color':(255,0,0,255),
        |         'watershed_steps':1,
        |         'fill_color':(0,0,0,255)
        |        },
        |        {'subset_logic':SL(phenotypes=['CD8+'],scored_calls={'PD1':'-'}),
        |         'edge_color':(255,0,255,255),
        |         'watershed_steps':1,
        |         'fill_color':(0,0,255,255)
        |        }
        |    ]
        |    imgs = imageaccess.build_segmentation_image(schema,background=(0,0,0,255))
        

        Args:
            schema (list): a list of layers (see example above)
            background (tuple): a color RGBA 0-255 tuple for the. background color
        Returns:
            SegmentationImageOutput: an output suitable for writing images

def build_segmentation_image(self,schema,background=(0,0,0,0)):
        """
        Put together an image.  Defined by a list of layers with RGBA colors

        Make the schema example
        
        |    schema = [
        |        {'subset_logic':SL(phenotypes=['SOX10+']),
        |         'edge_color':(31, 31, 46,255),
        |         'watershed_steps':0,
        |         'fill_color':(51, 51, 77,255)
        |        },
        |        {'subset_logic':SL(phenotypes=['CD8+'],scored_calls={'PD1':'+'}),
        |         'edge_color':(255,0,0,255),
        |         'watershed_steps':1,
        |         'fill_color':(0,0,0,255)
        |        },
        |        {'subset_logic':SL(phenotypes=['CD8+'],scored_calls={'PD1':'-'}),
        |         'edge_color':(255,0,255,255),
        |         'watershed_steps':1,
        |         'fill_color':(0,0,255,255)
        |        }
        |    ]
        |    imgs = imageaccess.build_segmentation_image(schema,background=(0,0,0,255))
        

        Args:
            schema (list): a list of layers (see example above)
            background (tuple): a color RGBA 0-255 tuple for the. background color
        Returns:
            SegmentationImageOutput: an output suitable for writing images
        """
        cummulative = self.copy()
        def _set_blank(img,blank):
            img[:][:] = blank
            return img
        cummulative['merged'] = cummulative.apply(lambda x: 
            _set_blank(np.zeros(list(x['shape'])+[4]),background)
            ,1)
        for layer in schema:
            if self.verbose: sys.stderr.write("Calculating layer "+str(layer)+"\n")
            images  = self.get_outline_images(subset_logic=layer['subset_logic'],
                                              edge_color=layer['edge_color'],
                                              watershed_steps=layer['watershed_steps'],
                                              fill_color=layer['fill_color'])
            cummulative = cummulative.rename(columns={'merged':'old'})
            cummulative = cummulative.merge(images,on=list(self.columns))
            cummulative['new'] = cummulative.apply(lambda x: _merge_images(x['merged'],x['old']),1)
            cummulative = cummulative.drop(columns=['old','merged']).rename(columns={'new':'merged'})
        cummulative = cummulative.rename(columns={'merged':'image'})
        return SegmentationImageOutput(cummulative)