OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
ColorDecomposeRecipe.cpp File Reference
#include "ColorDecomposeRecipe.hpp"
#include "FilamentMixer.hpp"
#include "Utils.hpp"
#include "nlohmann/json.hpp"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <limits>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for ColorDecomposeRecipe.cpp:

Go to the source code of this file.

Classes

struct  Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::LabColor
struct  Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::StandardRecipeEntry

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/
namespace  Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}

Functions

static double Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::srgb_to_linear (double v)
static double Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::xyz_to_lab_component (double v)
static LabColor Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::rgb_to_lab (const ColorDecomposeRgb &rgb)
static std::string Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::lab_to_srgb_hex (const LabColor &lab)
static double Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::delta_e76 (const LabColor &a, const LabColor &b)
static bool Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::material_matches (const std::string &a, const std::string &b)
static std::vector< std::vector< int > > Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::ratio_grid (size_t n)
static ColorDecomposeRecipeMode Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::parse_mode (const std::string &s)
static std::vector< StandardRecipeEntry > Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::load_standard_entries ()
static const std::vector< StandardRecipeEntry > & Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::standard_entries ()
static void Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::evaluate_candidate (const ColorDecomposeRgb &target, const std::vector< std::string > &hexes, const std::vector< int > &ratios, const std::vector< unsigned int > &indices, ColorDecomposeRecipeMode mode, double &best_score, ColorDecomposeRecipeResult &best)
std::string Slic3r::color_decompose_rgb_to_hex (const ColorDecomposeRgb &rgb)
bool Slic3r::color_decompose_hex_to_rgb (const std::string &hex, ColorDecomposeRgb &out)
ColorDecomposeRecipeResult Slic3r::recommend_from_physical_filaments (const ColorDecomposeRgb &target, const std::vector< ColorDecomposePhysicalFilament > &physical_filaments, const std::string &preferred_material_type)
ColorDecomposeRecipeResult Slic3r::lookup_standard_recipe (const ColorDecomposeRgb &target, ColorDecomposeRecipeMode mode, const std::string &preferred_material_type)
std::string Slic3r::lookup_measured_blend_color (const std::vector< std::string > &component_hexes, const std::vector< int > &ratios)

Class Documentation

◆ Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::LabColor

struct Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::LabColor
Class Members
double a {0.0}
double b {0.0}
double l {0.0}

◆ Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::StandardRecipeEntry

struct Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::StandardRecipeEntry
Collaboration diagram for Slic3r::anonymous_namespace{ColorDecomposeRecipe.cpp}::StandardRecipeEntry:
Class Members
vector< string > component_hexes
vector< string > component_keys
string material
string measured_hex
LabColor measured_lab
ColorDecomposeRecipeMode mode {ColorDecomposeRecipeMode::CMYW}
vector< int > ratios
string source