3
5Ad]q  ã               @   s¤  d Z ddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddljjZddlmZ d	d
lmZ d	dl m!Z!m"Z" d	dl#m$Z$ dddddddddddddgZ%G dd„ de!ƒZ&G dd„ de&ƒZ'G dd„ de'ƒZ(G d d!„ d!e'ƒZ)dddddddddddd	d"d#d$d%d&d'd(œZ*G d)d*„ d*e'ƒZ+e"e+ƒZ,G d+d,„ d,e+ƒZ-e"e-ƒZ.G d-d.„ d.e'ƒZ/e"e/ƒZ0G d/d0„ d0e'ƒZ1e"e1ƒZ2G d1d2„ d2e(ƒZ3e"e3ƒZ4G d3d4„ d4e(ƒZ5e"e5ƒZ6G d5d6„ d6e'ƒZ7e"e7ƒZ8G d7d8„ d8e'ƒZ9e"e9ƒZ:G d9d:„ d:e)ƒZ;e"e;ƒZ<G d;d<„ d<e)e+ƒZ=e"e=ƒZ>G d=d>„ d>e(ƒZ?e"e?ƒZ@G d?d@„ d@e(ƒZAe"eAƒZBG dAdB„ dBe!ƒZCe"eCƒZDG dCdD„ dDe'ƒZEdEdF„ ZFeFeGƒ ƒ dS )Gzâ
Modules factories and their associated functions for mlab.

Module functions meant to be applied to a data source object or a filter
should take only one positional argument, the input, to be easily used in
helper functions.
é    N)ÚTraitÚCArrayÚInstanceÚCFloatÚAnyÚfalseÚtrueÚ
TraitTupleÚRangeÚBoolÚPropertyÚCIntÚEnumÚEither)Ú
TraitError)Útvtk)Úcamel2enthought)Úlut_mode_list)Úregistryé   )Útools)ÚPipeFactoryÚmake_function)Ú	new_classÚvectorsÚglyphÚ
streamlineÚsurfaceÚiso_surfaceÚimage_actorÚcontour_surfaceÚcontour_grid_planeÚcustom_grid_planeÚimage_plane_widgetÚscalar_cut_planeÚvector_cut_planeÚvolumec            	   @   sj   e Zd ZdZeddeeddƒeddƒeddƒƒdd�Zdd„ Ze	dd	d
�Z
dd„ Ze	ddd
�Zdd„ ZdS )ÚModuleFactoryz) Base class for all the modules factoriesNg        g      ð?zèthe color of the vtk object. Overides the colormap,
                        if any, when specified. This is specified as a
                        triplet of float ranging from 0 to 1, eg (1, 1,
                        1) for white.)Úhelpc             C   sL   | j rH| j | jjj_ t| jjjdƒr0d| jjj_t| jdƒrH| j | jj_ d S )NÚscalar_visibilityFÚproperty)ÚcolorÚ_targetÚactorr*   ÚhasattrZmapperr)   )Úself© r0   ú{/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/mayavi-4.7.1-py3.6-linux-x86_64.egg/mayavi/tools/modules.pyÚ_color_changed3   s    zModuleFactory._color_changedz&The overall opacity of the vtk object.)Údescc             C   sR   y| j | jjj_ W n: tk
rL   y| j | jj_ W n tk
rF   Y nX Y nX d S )N)Úopacityr,   r-   r*   ÚAttributeError)r/   r0   r0   r1   Ú_opacity_changed>   s    zModuleFactory._opacity_changedg       @z% The width of the lines, if any used.c             C   sZ   y| j | jjj_ W nB ttfk
rT   y| j | jj_ W n ttfk
rN   Y nX Y nX d S )N)Ú
line_widthr,   r-   r*   r5   r   )r/   r0   r0   r1   Ú_line_width_changedJ   s    z!ModuleFactory._line_width_changed)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   r
   r+   r2   r   r4   r6   r7   r8   r0   r0   r0   r1   r'   *   s   	r'   c                   s”   e Zd ZdZedd�Zeddd�Zdd„ Ze	d	d�Z
d
d„ Zedeƒ dd�Zdd„ Zeddedd�Zeddedd�Zdd„ ZeZ‡ fdd„Z‡  ZS )ÚDataModuleFactoryz] Base class for all the module factories operating on data (ie not
        text and outline) ziReset the zoom to accomodate the data newly
                        added to the scene. Defaults to True.)r(   é   zÓ[xmin, xmax, ymin, ymax, zmin, zmax]
                            Default is the x, y, z arrays extent. Use
                            this to change the extent of the object
                            created.)Úshaper(   c             C   s   t j| j| jƒ d S )N)r   Z
set_extentr,   Úextent)r/   r0   r0   r1   Ú_extent_changedb   s    z!DataModuleFactory._extent_changedzRmake the opacity of the actor depend on the
                               scalar.c             C   s\   | j rX| jjjj}d| jjjj_tj|ƒd|j	ƒ |j
ƒ   tjddgƒ  }|| jjj_d S )Nçš™™™™™É?çš™™™™™é?gš™™™™™Ù?r   )rB   rC   éÿÿÿÿ)Útransparentr,   Úmodule_managerÚscalar_lut_managerÚ
data_rangeZlutZalpha_rangeÚnumpyÚmeanÚmaxÚminÚarray)r/   rH   r0   r0   r1   Ú_transparent_changedh   s    $z&DataModuleFactory._transparent_changedzblue-redztype of colormap to use.c             C   sV   | j }|dd … dkr:|d d… }d| jjj_d| jjj_|| jjj_|| jjj_d S )Né   Ú_rTéþÿÿÿrQ   )Úcolormapr,   rF   rG   Zreverse_lutZvector_lut_managerZlut_mode)r/   rR   r0   r0   r1   Ú_colormap_changedw   s    z#DataModuleFactory._colormap_changedNzivmin is used to scale the colormap.
                            If None, the min of the data will be usedzivmax is used to scale the colormap.
                            If None, the max of the data will be usedc             C   sœ   | j d kr$| jd kr$d| jjj_d S d| jjj_| jjjj\}}| j d k	rd| j }| jd krdt||ƒ}| jd k	rˆ| j}| j d krˆt||ƒ}||f| jjj_d S )NTF)	ÚvminÚvmaxr,   rF   rG   Zuse_default_rangerH   rK   rL   )r/   rT   rU   r0   r0   r1   Ú_vmin_changedˆ   s    





zDataModuleFactory._vmin_changedc                s4   t t| ƒj||Ž | jj}|d k	r0| jr0|jƒ  d S )N)Úsuperr=   Ú__init__Z_sceneÚsceneÚ
reset_zoom)r/   ÚargsÚkwargsrY   )Ú	__class__r0   r1   rX   ¡   s    zDataModuleFactory.__init__)r>   )r9   r:   r;   r<   r   rZ   r   r@   rA   r   rE   rN   r   r   rR   rS   r   rT   rU   rV   Ú_vmax_changedrX   Ú__classcell__r0   r0   )r]   r1   r=   U   s&   	r=   c               @   s$   e Zd ZdZeddd�Zdd„ ZdS )ÚContourModuleFactoryz7 Base class for all the module factories with contours é   z¥Integer/list specifying number/list of
                    contours. Specifying a list of values will only
                    give the requested contours asked for.)r(   c             C   sœ   d}yt | jƒ W n tk
r*   d}Y nX |rHd| jj_| j| jj_n<t| jƒtks^tdƒ‚| jdksptdƒ‚| jjj	d| jd� t
| jdƒr˜d| j_d S )NTFz(The contours argument must be an integerr   z&The contours argument must be positive)Úauto_contoursZnumber_of_contoursÚenable_contours)ÚlenÚcontoursÚ	TypeErrorr,   Zcontourrb   ÚtypeÚintÚAssertionErrorZ	trait_setr.   rc   )r/   Zcontour_listr0   r0   r1   Ú_contours_changed°   s    



z&ContourModuleFactory._contours_changedN)r9   r:   r;   r<   r   re   rj   r0   r0   r0   r1   r`   ©   s   r`   c               @   s6   e Zd ZdZeddddd�Zeddd	d
�Zdd„ ZdS )ÚCutPlaneFactoryz. Base class for modules with a cut plane.
    Úx_axesÚy_axesÚz_axeszthe orientation of the plane)r3   Tzimplicit_plane.visiblez7Whether or not the controls of the cut plane are shown.)Úadaptsr3   c             C   sF   t tjdddgƒtjdddgƒtjdddgƒd�}|| j | jj_d S )Ng      ð?g        )rl   rm   rn   )ÚdictrI   rM   Úplane_orientationr,   Zimplicit_planeÚnormal)r/   Úchoicesr0   r0   r1   Ú_plane_orientation_changedÐ   s    z*CutPlaneFactory._plane_orientation_changedN)	r9   r:   r;   r<   r   rq   r   Zview_controlsrt   r0   r0   r0   r1   rk   Å   s   rk   rO   é   é   ra   r>   é   )Ú2darrowZ2dcircleZ2dcrossZ2ddashZ	2ddiamondZ2dhooked_arrowZ2dsquareZ2dthick_arrowZ2dthick_crossZ
2dtriangleZ2dvertexZarrowZconeZcylinderÚsphereZcubeÚaxesÚpointc               @   sˆ   e Zd ZdZeejf ƒZedddd�Z	e
dddd	d
œdd�Zeddd�Zededd�Zdd„ Zdd„ Zdd„ Ze
dedd�Zdd„ ZdS )ÚVectorsFactoryzoApplies the Vectors mayavi module to the given data object
        source (Mayavi source, or VTK dataset).
    g      ð?zglyph.glyph.scale_factorz the scaling applied to the glyphs. The
                                    size of the glyph is by default in drawing
                                    units.)ro   r3   ÚvectorÚdata_scaling_offÚscale_by_scalarÚscale_by_vector)ÚnoneÚscalarr}   z\the scaling mode for the glyphs
                            ('vector', 'scalar', or 'none').)r(   é   ztThe resolution of the glyph created. For spheres, for instance, this is the number of divisions along theta and phi.)r3   Nz”If supplied, only one out of 'mask_points' data point is displayed. This option is useful to reduce the number of points displayed on large datasetsc             C   sj   | j jjj}t|dƒr| j|_t|dƒr0| j|_t|dƒrB| j|_t|dƒrT| j|_t|dƒrf| j|_d S )NÚtheta_resolutionÚphi_resolutionÚ
resolutionÚshaft_resolutionÚtip_resolution)	r,   r   Úglyph_sourcer.   r†   r„   r…   r‡   rˆ   )r/   r   r0   r0   r1   Ú_resolution_changed  s    




z"VectorsFactory._resolution_changedc             C   s&   | j d k	r"d| jj_| j | jjj _d S )NT)Úmask_pointsr,   r   Zmask_input_pointsZon_ratio)r/   r0   r0   r1   Ú_mask_points_changed  s    

z#VectorsFactory._mask_points_changedc             C   s   | j | jj_d S )N)Zscale_mode_r,   r   Ú
scale_mode)r/   r0   r0   r1   Ú_scale_mode_changed  s    z"VectorsFactory._scale_mode_changedrx   zthe mode of the glyphs.c             C   sn   | j }t|jjdƒr|jj}n|j}| jdkr@tjddd�|_n|j| j |_| jdkrj| jdd … |j_	d S )Nr‰   r{   r   r   )ÚradiusZnumber_of_pointsrO   )
r,   r.   r   r‰   Úmoder   ZPointSourceZ
glyph_listZmode_Z
glyph_type)r/   ÚvÚgr0   r0   r1   Ú_mode_changed  s    


zVectorsFactory._mode_changed)r9   r:   r;   r<   r   ÚmodulesZVectorsr,   r   Zscale_factorr   r�   r   r†   r   r‹   rŠ   rŒ   rŽ   Úglyph_mode_dictr�   r“   r0   r0   r0   r1   r|   ç   s"   r|   c               @   s@   e Zd ZdZeejf ƒZedddddœdd�Z	ed	e
d
d�ZdS )ÚGlyphFactoryzjApplies the Glyph mayavi module to the given VTK data
        source (Mayavi source, or VTK dataset).
    r‚   r~   r   r€   )r�   r‚   r}   z\the scaling mode for the glyphs
                            ('vector', 'scalar', or 'none').)r(   ry   zthe mode of the glyphs.)r3   N)r9   r:   r;   r<   r   r”   ZGlyphr,   r   r�   r•   r�   r0   r0   r0   r1   r–   .  s   r–   c                   s˜   e Zd ZdZeejf ƒZedddddd�Z	edd	d
dddœdd�Z
edddd�Zeddd�Zededd�Zedddddd�Z‡ fdd„Zdd„ Z‡  ZS ) ÚStreamlineFactoryzBApplies the Streamline mayavi module to the given VTK data object.ÚlineZribbonZtubeZstreamline_typezOthe type of line-like object used to display the
                   streamline.)ro   r3   ry   r   r   rO   ru   )ry   r˜   Úplaner{   z.the widget used as a seed for the streamlines.)r3   Tzseed.widget.enabledz#Control the visibility of the seed.g      ð?z)Scales the seed around its default centerNz@The resolution of the seed. Determines the number of seed pointsZforwardZbackwardZbothz#stream_tracer.integration_directionz!The direction of the integration.c                s,   |dkr| j jd krntt| ƒj||ƒ d S )NÚseed_visible)r,   rY   rW   r—   Ú_anytrait_changed)r/   ÚnameÚvalue)r]   r0   r1   r›   b  s    z#StreamlineFactory._anytrait_changedc             C   s®  | j jj| j  | j j_}| j j}| jdk�s4|d k	r<d|_| jdkrˆ|j	}|j
}|| d }|| j||   |_	|| j||   |_
n‚| jdkrî|j	}|j
}|| d }|j}|| j||   |_	|| j||   |_
|| j||   |_n| jdk�r
| j| j9  _| j jjƒ  | j jjƒ  |d k	�r4| j|_| jd k	�rª|d k	�rPd|_| jdk�rf| j|_n| jdk�r€| j |_|_| j jjƒ  | j jjƒ  |d k	�rª| j|_d S )Ng      ð?Tr˜   g       @r™   ry   )r™   r˜   )r,   ÚseedZwidget_listZ	seedtype_ÚwidgetrY   Ú
seed_scaleÚenabledÚseedtypeZpoint1Zpoint2Úoriginr�   ÚstopÚstartrš   Úseed_resolutionr†   r…   r„   )r/   rŸ   rY   Úp1Úp2ÚcenterÚor0   r0   r1   Ú_seedtype_changedh  sH    





z#StreamlineFactory._seedtype_changed)r9   r:   r;   r<   r   r”   Z
Streamliner,   r   Úlinetyper¢   r   rš   r   r    r   r   r¦   Zintegration_directionr›   r«   r_   r0   r0   )r]   r1   r—   C  s(   r—   c               @   s.   e Zd ZdZeejf ƒZedddddd�Z	dS )	ÚSurfaceFactoryzhApplies the Surface mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    r   Z	wireframeÚpointszactor.property.representationz-the representation type used for the surface.)ro   r3   N)
r9   r:   r;   r<   r   r”   ÚSurfacer,   r   Zrepresentationr0   r0   r0   r1   r­      s
   r­   c               @   s   e Zd ZdZeejf ƒZdS )ÚIsoSurfaceFactoryzkApplies the IsoSurface mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    N)r9   r:   r;   r<   r   r”   Z
IsoSurfacer,   r0   r0   r0   r1   r°   ¯  s   r°   c                   s,   e Zd ZdZeejf ƒZ‡ fdd„Z‡  Z	S )ÚContourSurfaceFactoryz}Applies the Surface mayavi module to the given data
       source (Mayavi source, or VTK dataset) and turns contours on.
    c                s   t t| ƒj||Ž | jƒ  dS )z- Overriding the __init__ to turn contours on.N)rW   r±   rX   rj   )r/   r[   r\   )r]   r0   r1   rX   À  s    zContourSurfaceFactory.__init__)
r9   r:   r;   r<   r   r”   r¯   r,   rX   r_   r0   r0   )r]   r1   r±   º  s   r±   c               @   s<   e Zd ZdZeejf ƒZedddd�Z	e
ddddd	d�Zd
S )ÚImageActorFactoryzBApplies the ImageActor mayavi module to the given VTK data object.Tzactor.interpolatezPif the pixels in the image are to be
                       interpolated or not.)ro   r3   g        g      ð?zactor.opacityzthe opacity of the image.N)r9   r:   r;   r<   r   r”   Z
ImageActorr,   r   Úinterpolater
   r4   r0   r0   r0   r1   r²   Ê  s   
r²   c               @   sN   e Zd ZdZeejf ƒZedddd�Z	e
ddddd	d
�Zedddddd
�ZdS )ÚImagePlaneWidgetFactoryzr Applies the ImagePlaneWidget mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    r   zipw.slice_indexzUThe index along wich the
                                            image is sliced.)ro   r(   g        g      ð?zipw.plane_property.opacityzthe opacity of the plane actor.)ro   r3   rl   rm   rn   zipw.plane_orientationzthe orientation of the planeN)r9   r:   r;   r<   r   r”   ZImagePlaneWidgetr,   r   Zslice_indexr
   Zplane_opacityr   rq   r0   r0   r0   r1   r´   Ú  s   
r´   c               @   s   e Zd ZdZeejf ƒZdS )ÚScalarCutPlaneFactoryzp Applies the ScalarCutPlane mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    N)r9   r:   r;   r<   r   r”   ZScalarCutPlaner,   r0   r0   r0   r1   rµ   ï  s   rµ   c               @   s   e Zd ZdZeejf ƒZdS )ÚVectorCutPlaneFactoryzp Applies the VectorCutPlane mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    N)r9   r:   r;   r<   r   r”   ZVectorCutPlaner,   r0   r0   r0   r1   r¶   ù  s   r¶   c               @   s   e Zd ZdZeejf ƒZdS )ÚContourGridPlaneFactoryzr Applies the ContourGridPlane mayavi module to the given data
        source (Mayavi source, or VTK dataset).
    N)r9   r:   r;   r<   r   r”   ZContourGridPlaner,   r0   r0   r0   r1   r·     s   r·   c               @   s   e Zd ZdZeejf ƒZdS )ÚCustomGridPlaneFactoryzu Applies the CustomGridPlane mayavi module to the given VTK data
        source (Mayavi source, or VTK dataset).
    N)r9   r:   r;   r<   r   r”   ZCustomGridPlaner,   r0   r0   r0   r1   r¸     s   r¸   c            	   @   s‚   e Zd ZdZeddeeddƒeddƒeddƒƒdd�Zeddedd�Z	eddedd�Z
eejf ƒZedƒZd	d
„ Zdd„ ZeZdS )ÚVolumeFactoryaã   Applies the Volume mayavi module to the given VTK data
        source (Mayavi source, or VTK dataset).

        **Note**

        The range of the colormap can be changed simply using the
        vmin/vmax parameters (see below). For more complex modifications of
        the colormap, here is some pseudo code to change the ctf (color
        transfer function), or the otf (opacity transfer function)::

            vol = mlab.pipeline.volume(src)

            # Changing the ctf:
            from tvtk.util.ctf import ColorTransferFunction
            ctf = ColorTransferFunction()
            ctf.add_rgb_point(value, r, g, b)  # r, g, and b are float
                                               # between 0 and 1
            ctf.add_hsv_point(value, h, s, v)
            # ...
            vol._volume_property.set_color(ctf)
            vol._ctf = ctf
            vol.update_ctf = True

            # Changing the otf:
            from tvtk.util.ctf import PiecewiseFunction
            otf = PiecewiseFunction()
            otf.add_point(value, opacity)
            vol._otf = otf
            vol._volume_property.set_scalar_opacity(otf)

        Also, it might be useful to change the range of the ctf::

            ctf.range = [0, 1]
    Ng        g      ð?zèthe color of the vtk object. Overides the colormap,
                        if any, when specified. This is specified as a
                        triplet of float ranging from 0 to 1, eg (1, 1,
                        1) for white.)r(   z’vmin is used to scale the transparency
                            gradient. If None, the min of the data will be
                            usedz’vmax is used to scale the transparency
                            gradient. If None, the max of the data will be
                            usedc             C   sš   | j s
d S | jj\}}ddlm} |ƒ }y||f|_W n tk
rJ   Y nX | j \}}}|j||||ƒ |j||||ƒ || j_| jj	j
|ƒ d| j_d S )Nr   )ÚColorTransferFunctionT)r+   r,   Úcurrent_rangeÚtvtk.util.ctfrº   ÚrangeÚ	ExceptionÚadd_rgb_pointÚ_ctfÚ_volume_propertyÚ	set_colorÚ
update_ctf)r/   Ú	range_minÚ	range_maxrº   ÚctfÚrr’   Úbr0   r0   r1   r2   S  s    zVolumeFactory._color_changedc                s^  | j ‰| j‰| jj\‰‰ˆd kr$ˆ‰ˆd kr0ˆ‰ddlm}m} |ƒ }ˆˆk rZ|jˆdƒ ˆˆkrn|jˆdƒ |jˆdƒ |jˆdƒ || j_| jj	j
|ƒ | jd ko¸| j d k	s¼| jd k	�rR| jrÎ| j\‰‰ n
ˆˆ ‰‰ ‡ ‡‡‡fdd„}| jjjƒ  | jjj\‰‰‡‡‡‡fdd„}t| jjd	ƒ�rntƒ }xP| jjjD ]0}| jjj|ƒ\}}	}
|j||ƒ||	|
fƒ �q8W n|| jjƒd
 }ddlm} |ƒ }yˆˆf|_W n tk
�r´   Y nX |jƒ  |d }|jˆ|d |d |d ƒ x2|D ]*}|j||d ƒ|d |d |d ƒ �qèW |jˆ|d |d |d ƒ || j_| jj	j|ƒ ˆˆf| _d| j_d S )Nr   )ÚPiecewiseFunctionÚ	save_ctfsg        gš™™™™™É?c                s    | ˆ ˆ ˆ  }ˆ|ˆˆ   S )Nr0   )ÚxÚnx)Úlast_maxÚlast_minrU   rT   r0   r1   Ú_rescale_value‡  s    z3VolumeFactory._vmin_changed.<locals>._rescale_valuec                s    | ˆ ˆˆ  }ˆ|ˆ ˆ   S )Nr0   )rË   rÌ   )rÅ   rÄ   Ú	scale_maxÚ	scale_minr0   r1   Ú_rescale_node‘  s    z2VolumeFactory._vmin_changed.<locals>._rescale_nodeÚnodesÚrgb)rº   r   rO   ru   T)rT   rU   r,   r»   r¼   rÉ   rÊ   Z	add_pointZ_otfrÁ   Zset_scalar_opacityr+   Ú_VolumeFactory__last_vrangerÀ   Zupdate_traitsr½   r.   ÚlistrÓ   Z	get_colorÚappendZvolume_propertyrº   r¾   Úsortr¿   rÂ   rÃ   )r/   rÉ   rÊ   ZotfrÏ   rÒ   rÔ   r�   rÇ   r’   rÈ   rº   rÆ   r‘   r0   )rÍ   rÎ   rÅ   rÄ   rÐ   rÑ   rU   rT   r1   rV   g  s`    


*
zVolumeFactory._vmin_changed)r9   r:   r;   r<   r   r	   r
   r+   r   rT   rU   r   r”   ZVolumer,   r   rÕ   r2   rV   r^   r0   r0   r0   r1   r¹     s   "Lr¹   c               @   s$   e Zd ZdZeZedƒZdd„ ZdS )Ú_AutomaticModuleFactoryz¾The base class for any auto-generated factory classes.

    NOTE: This class requires the `_metadata` trait be set to
    the metadata object for the object for which this is a factory.
    Nc             C   s   | j dkr| jjƒ ƒ | _ | j S )zGetter for the _target trait.N)Ú_saved_targetÚ	_metadataZget_callable)r/   r0   r0   r1   Ú_get__targetÈ  s    
z$_AutomaticModuleFactory._get__target)	r9   r:   r;   r<   r   r,   r   rÚ   rÜ   r0   r0   r0   r1   rÙ   »  s   rÙ   c             C   s¦   dddg}x–t jD ]Œ}t|jƒ}|j}|jdƒrH|dd
… }|dd… }|d }|| ks||krbqt|tfd	|jiƒ}||_t	|ƒ}|| |< || |< t
j|ƒ qW dS )z[Make the functions for adding modules and add them to the
    namespace automatically.
    rz   ÚtextZorientation_axesÚ_moduleNrw   r>   ZFactoryr<   iùÿÿÿiúÿÿÿ)r   r”   r   ÚidÚendswithr   rÙ   r(   rÛ   r   Ú__all__r×   )Ú	namespaceÚignoreÚmodÚ	func_nameÚ
class_nameÚklassÚfuncr0   r0   r1   Ú_make_functionsÐ  s"    


ré   )Hr<   rI   Z
traits.apir   r   r   r   r   r   r   r	   r
   r   r   r   r   r   Ztraits.trait_errorsr   Ztvtk.apir   Ztvtk.commonr   Zmayavi.core.lut_managerr   Zmayavi.modules.apir”   ZapiZmayavi.core.registryr   Ú r   Z	pipe_baser   r   Úfiltersr   rá   r'   r=   r`   rk   r•   r|   r   r–   r   r—   r   r­   r   r°   r   r±   r    r²   r   r´   r#   rµ   r$   r¶   r%   r·   r!   r¸   r"   r¹   r&   rÙ   ré   Úlocalsr0   r0   r0   r1   Ú<module>   sp   @

+TCY  