Module Expr Str Import alias identifier Import alias identifier Import alias identifier Import alias identifier ImportFrom alias alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Num Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad NameLoad NameLoad keyword BinOpMod Str Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body AugAssignAdd NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body AugAssignAdd NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareEq BinOpMod Call NameLoad NameLoad NameLoad Num Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Slice NameLoad While CompareLt Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Index AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpDiv AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index CompareLt NameLoad Num Num orelse Raise Call NameLoad BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr Str body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad NameLoad Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr TupleLoad Num Call NameLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Expr Call NameLoad Num NameLoad NameLoad BinOpMod Str NameLoad keyword Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMod Str TupleLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Num Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad Num NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Num Num Expr Call NameLoad Num NameLoad NameLoad BinOpMod Str NameLoad keyword Call AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareNotEq AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd NameLoad CompareEq NameLoad Num body Assign NameStore NameLoad Assign NameStore Num If BoolOpAnd UnaryOpNot NameLoad CompareEq NameLoad Num body Assign NameStore Num If BoolOpAnd UnaryOpNot NameLoad CompareEq NameLoad Num body Assign NameStore Num Assign NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index NameLoad Delete SubscriptDel NameLoad Slice NameLoad NameLoad Assign NameStore Num orelse For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A <b>Correct Illumination - Apply</b> applies an illumination function, usually created by
<b>CorrectIlluminationCalculate</b>, to an image in order to correct for uneven
illumination (uneven shading).
<hr>

This module applies a previously created illumination correction function,
either loaded by <b>LoadSingleImage</b> or created by <b>CorrectIlluminationCalculate</b>.
This module corrects each image in the pipeline using the function specified.

See also <b>CorrectIlluminationCalculate</b>. N/A numpy np N/A cellprofiler.cpimage cpi N/A cellprofiler.cpmodule cpm N/A cellprofiler.settings cps cellprofiler.modules.correctilluminationcalculate IC_BACKGROUND IC_REGULAR N/A DOS_DIVIDE Divide N/A DOS_SUBTRACT Subtract N/A RE_NONE No rescaling N/A RE_STRETCH Stretch 0 to 1 N/A RE_MATCH Match maximums N/A SETTINGS_PER_IMAGE 4 CorrectIlluminationApply N/A N/A cpm CPModule N/A N/A category Image Processing N/A variable_revision_number 3 N/A module_name CorrectIlluminationApply create_settings N/A N/A self N/A N/A N/A Make settings here (and set the module name) N/A N/A self images N/A N/A N/A N/A self add_image can_delete False N/A N/A self add_image_button N/A N/A cps DoSomething Add another image N/A self add_image N/A add_image N/A N/A self can_delete N/A True N/A N/A Add an image and its settings to the list of images N/A image_name N/A N/A cps ImageNameSubscriber Select the input image N/A cps NONE doc 
            Select the image to be corrected. N/A corrected_image_name N/A N/A cps ImageNameProvider Name the output image CorrBlue doc 
            Enter a name for the corrected image. N/A illum_correct_function_image_name N/A N/A cps ImageNameSubscriber Select the illumination function N/A cps NONE doc 
            Select the illumination correction function image that will be used to
            carry out the correction. This image is usually produced by another module
            or loaded as a .mat format image using the <b>Images</b> module or
            <b>LoadSingleImage</b>. N/A divide_or_subtract N/A N/A cps Choice Select how the illumination function is applied N/A DOS_DIVIDE DOS_SUBTRACT doc N/A 
            This choice depends on how the illumination function was calculated
            and on your physical model of the way illumination variation affects the
            background of images relative to the objects in images; it is also somewhat empirical.
            <ul>
            <li><i>%(DOS_SUBTRACT)s:</i> Use this option if the background signal is significant
            relative to the real signal coming from the cells.  If you created the illumination
            correction function using <i>%(IC_BACKGROUND)s</i>,
            then you will want to choose <i>%(DOS_SUBTRACT)s</i> here.</li>
            <li><i>%(DOS_DIVIDE)s:</i> Choose this option if the signal to background ratio
            is high (the cells are stained very strongly). If you created the illumination correction
            function using <i>%(IC_REGULAR)s</i>,
            then you will want to choose <i>%(DOS_DIVIDE)s</i> here.</li>
            </ul> N/A globals N/A image_settings N/A N/A cps SettingsGroup N/A N/A N/A image_settings append image_name image_name N/A N/A N/A image_settings append corrected_image_name corrected_image_name N/A N/A N/A image_settings append illum_correct_function_image_name illum_correct_function_image_name N/A N/A N/A image_settings append divide_or_subtract divide_or_subtract N/A N/A N/A image_settings append rescale_option RE_NONE N/A can_delete N/A N/A N/A N/A image_settings append remover N/A N/A cps RemoveSettingButton Remove this image N/A self images image_settings N/A N/A N/A image_settings append divider N/A N/A cps Divider N/A N/A N/A N/A self images append image_settings N/A settings N/A N/A self N/A N/A N/A Return the settings to be loaded or saved to/from the pipeline

        These are the settings (from cellprofiler.settings) that are
        either read from the strings in the pipeline or written out
        to the pipeline. The settings should appear in a consistent
        order so they can be matched to the strings in the pipeline.
         N/A result N/A N/A image N/A self images N/A N/A result N/A N/A image image_name N/A image corrected_image_name N/A image illum_correct_function_image_name N/A image divide_or_subtract N/A result N/A visible_settings N/A N/A self N/A N/A N/A Return the list of displayed settings
         N/A result N/A N/A image N/A self images N/A N/A result N/A N/A image image_name N/A image corrected_image_name N/A image illum_correct_function_image_name N/A image divide_or_subtract N/A remover N/A getattr image remover None N/A N/A remover None N/A N/A N/A N/A result append remover N/A N/A N/A result append N/A image divider N/A N/A N/A result append N/A self add_image_button N/A result N/A prepare_settings N/A N/A self setting_values N/A N/A N/A Do any sort of adjustment to the settings required for the given values

        setting_values - the values for the settings

        This method allows a module to specialize itself according to
        the number of settings and their value. For instance, a module that
        takes a variable number of images or objects can increase or decrease
        the number of relevant settings so they map correctly to the values.
         N/A N/A N/A N/A len setting_values SETTINGS_PER_IMAGE 0 N/A image_count N/A N/A len setting_values SETTINGS_PER_IMAGE N/A N/A N/A self images N/A image_count N/A N/A N/A len N/A self images image_count N/A N/A N/A N/A self add_image N/A run N/A N/A self workspace N/A N/A N/A Run the module

        workspace    - The workspace contains
            pipeline     - instance of cpp for this run
            image_set    - the images in the image set being processed
            object_set   - the objects (labeled masks) in this image set
            measurements - the measurements for this run
            frame        - the parent frame to whatever frame is created. None means don't draw.
         N/A image N/A self images N/A N/A N/A N/A self run_image image workspace N/A run_image N/A N/A self image workspace N/A N/A N/A Perform illumination according to the parameters of one image setting group

         N/A image_name N/A N/A image image_name value N/A illum_correct_name N/A N/A image illum_correct_function_image_name value N/A corrected_image_name N/A N/A image corrected_image_name value N/A orig_image N/A N/A N/A workspace image_set get_image image_name N/A illum_function N/A N/A N/A workspace image_set get_image illum_correct_name N/A illum_function_pixel_data N/A illum_function pixel_data N/A N/A N/A N/A orig_image pixel_data ndim 2 N/A N/A illum_function N/A N/A N/A workspace image_set get_image illum_correct_name must_be_grayscale True N/A N/A N/A N/A illum_function_pixel_data ndim 2 N/A N/A illum_function_pixel_data N/A illum_function_pixel_data N/A N/A N/A N/A N/A np newaxis N/A N/A N/A image divide_or_subtract DOS_DIVIDE N/A N/A output_pixels N/A N/A orig_image pixel_data illum_function_pixel_data N/A N/A N/A N/A image divide_or_subtract DOS_SUBTRACT N/A N/A output_pixels N/A N/A orig_image pixel_data illum_function_pixel_data N/A N/A output_pixels N/A N/A output_pixels 0 0 N/A N/A N/A ValueError N/A Unhandled option for divide or subtract: %s N/A N/A image divide_or_subtract value N/A output_image N/A N/A cpi Image output_pixels parent_image orig_image N/A N/A N/A N/A workspace image_set add corrected_image_name output_image N/A N/A self show_window N/A N/A N/A N/A hasattr N/A workspace display_data images N/A N/A N/A N/A workspace display_data images N/A N/A N/A N/A N/A workspace display_data images N/A image_name N/A orig_image pixel_data N/A N/A N/A N/A workspace display_data images N/A corrected_image_name output_pixels N/A N/A N/A N/A workspace display_data images N/A illum_correct_name N/A illum_function pixel_data N/A display N/A N/A self workspace figure N/A N/A N/A  Display one row of orig / illum / output per image setting group N/A N/A N/A figure set_subplots N/A 3 N/A len N/A self images N/A N/A j image N/A enumerate N/A self images N/A N/A image_name N/A N/A image image_name value N/A illum_correct_function_image_name N/A N/A image illum_correct_function_image_name value N/A corrected_image_name N/A N/A image corrected_image_name value N/A orig_image N/A N/A N/A workspace display_data images N/A image_name N/A illum_image N/A N/A N/A workspace display_data images N/A illum_correct_function_image_name N/A corrected_image N/A N/A N/A workspace display_data images N/A corrected_image_name imshow N/A N/A x y image N/A args kwargs N/A N/A N/A N/A image ndim 2 N/A N/A f N/A figure subplot_imshow_grayscale N/A N/A f N/A figure subplot_imshow_color N/A N/A f x y image args kwargs N/A N/A N/A imshow 0 j orig_image N/A Original image: %s image_name sharexy N/A N/A figure subplot 0 0 N/A title N/A Illumination function: %s
min=%f, max=%f N/A illum_correct_function_image_name N/A round N/A N/A illum_image min 4 N/A round N/A N/A illum_image max 4 N/A N/A imshow 1 j illum_image title sharexy N/A N/A figure subplot 0 0 N/A N/A imshow 2 j corrected_image N/A Final image: %s corrected_image_name sharexy N/A N/A figure subplot 0 0 N/A validate_module_warnings N/A N/A self pipeline N/A N/A N/A If a CP 1.0 pipeline used a rescaling option other than 'No rescaling', warn the user. N/A N/A j image N/A enumerate N/A self images N/A N/A N/A N/A image rescale_option RE_NONE N/A N/A N/A N/A cps ValidationError N/A Your original pipeline used '%s' to rescale the final image, but the rescaling option has been removed. Please use RescaleIntensity to rescale your output image. Save your pipeline to get rid of this warning. N/A image rescale_option N/A image divide_or_subtract N/A upgrade_settings N/A N/A self setting_values variable_revision_number module_name from_matlab N/A N/A N/A Adjust settings based on revision # of save file

        setting_values - sequence of string values as they appear in the
                         saved pipeline
        variable_revision_number - the variable revision number of the module
                                   at the time of saving
        module_name - the name of the module that did the saving
        from_matlab - True if saved in CP Matlab, False if saved in pyCP

        returns the updated setting_values, revision # and matlab flag
         N/A N/A from_matlab N/A variable_revision_number 3 N/A N/A from_matlab False N/A variable_revision_number 1 N/A N/A N/A from_matlab N/A variable_revision_number 1 N/A N/A variable_revision_number 2 N/A N/A N/A from_matlab N/A variable_revision_number 2 N/A N/A SLOT_RESCALE_OPTION 4 N/A SETTINGS_PER_IMAGE_V2 5 N/A rescale_option N/A setting_values N/A SLOT_RESCALE_OPTION SETTINGS_PER_IMAGE_V2 N/A N/A i image N/A enumerate N/A self images N/A N/A N/A image rescale_option N/A rescale_option N/A i N/A N/A setting_values N/A SLOT_RESCALE_OPTION SETTINGS_PER_IMAGE_V2 N/A variable_revision_number 3 N/A N/A N/A i image N/A enumerate N/A self images N/A N/A N/A image rescale_option RE_NONE N/A N/A setting_values variable_revision_number from_matlab N/A N/A