blue_cwl.density_manipulation

DensityManipulation of nrrd files.

Functions

density_manipulation(output_dir, ...[, ...])

Manipulate the densities in a CellCompositionVolume.

read_density_manipulation_recipe(recipe)

Read the density recipe dictionary, and transform it into a DataFrame.

blue_cwl.density_manipulation.density_manipulation(output_dir: str | PathLike[str], brain_regions: VoxelData, manipulation_recipe: DataFrame, materialized_densities: DataFrame, original_density_release: dict, region_selection=None)

Manipulate the densities in a CellCompositionVolume.

Parameters:
  • output_dir (str) – where to output the updated densities

  • brain_regions – annotation atlas

  • manipulation_recipe – dataframe containing the manipulations to perform

  • materialized_densities – dataframe with the densities

  • original_density_release – The original density release dictionary

  • region_selection – Optional list of region ids to subset.

blue_cwl.density_manipulation.read_density_manipulation_recipe(recipe: dict) DataFrame

Read the density recipe dictionary, and transform it into a DataFrame.