def __init__(self, tcoords, svgfile, callback=None, linewidth=None,
                 linecolor=None, roifill=None, shadow=None, labelsize=None,
                 labelcolor=None, dashtype='fromsvg', dashoffset='fromsvg',
                 layer='rois'):
        if isinstance(layer,(list,tuple)):
            # More elegant would be to have ROIpack be a fundamentally multi-layer
            # object, but for backward compatibility and for not breaking other
            # other parts of the code (e.g. finding roi indices, etc) I have kept 
            # it this way ML 2014.08.12
            self.svgfile = svgfile
            self.callback = callback
            self.kdt = cKDTree(tcoords)
            self.layer = 'multi_layer'
            self.layers = {}
            self.rois = {}
            self.layer_names = layer
            layer1 = layer[0]
            # Recursive call to create multiple layers
            for iL,L in enumerate(layer):
                self.layers[L] = ROIpack(tcoords, svgfile, callback, linewidth, linecolor, 
                    roifill, shadow, labelsize, labelcolor, dashtype, dashoffset,
                    layer=L)
                # Necessary?
                self.rois.update(self.layers[L].rois)
                # # Create combined svg out of individual layer svgs
                if iL == 0:
                    self.tcoords = self.layers[layer1].tcoords
                    svg_fin = copy.copy(self.layers[layer1].svg)
                elif iL>0:
                    to_add = _find_layer(self.layers[L].svg, L)
                    svg_fin.getroot().insert(0, to_add)
            # linewidth, etc not set - set in individual layers
            self.svg = svg_fin
        else:
            # Normalize coordinates 0-1
            if np.any(tcoords.max(0) > 1) or np.any(tcoords.min(0) < 0):
                tcoords -= tcoords.min(0)
                tcoords /= tcoords.max(0)
            self.tcoords = tcoords
            self.svgfile = svgfile
            self.callback = callback
            self.kdt = cKDTree(tcoords)
            self.layer = layer 
            # Display parameters
            if layer in config.sections():
                dlayer = layer
            else:
                # Unknown display layer; default to values for ROIs
                import warnings
                warnings.warn('No defaults set for display layer %s; Using defaults for ROIs in options.cfg file'%layer)
                dlayer = 'rois'                
            self.linewidth = float(config.get(dlayer, "line_width")) if linewidth is None else linewidth
            self.linecolor = tuple(map(float, config.get(dlayer, "line_color").split(','))) if linecolor is None else linecolor
            self.roifill = tuple(map(float, config.get(dlayer, "fill_color").split(','))) if roifill is None else roifill
            self.shadow = float(config.get(dlayer, "shadow")) if shadow is None else shadow

            # For dashed lines, default to WYSIWYG from rois.svg
            self.dashtype = dashtype
            self.dashoffset = dashoffset

            self.reload(size=labelsize, color=labelcolor)
Create 1D FFT plan configuration.
dataset/ETHPy150Open gallantlab/pycortex/cortex/svgroi.py/ROIpack.__init__--crossover with--dataset/ETHPy150Open lebedov/scikit-cuda/skcuda/cufft.py/cufftMakePlan1d