Commits

Robert Kern  committed 9f67fb4

Local data.

  • Participants
  • Parent commits 2ef5e85

Comments (0)

Files changed (2)

File colormap_explorer/plugin/model_plugin_definition.py

         Colormaps(uol='factory://colormap_explorer.colormap_db.load_matplotlib_colormaps'),
         Colormaps(uol='factory://colormap_explorer.colormap_db.load_colorbrewer_colormaps'),
         Colormaps(uol='factory://colormap_explorer.colormap_db.load_monochrome_colormaps'),
+        # XXX: colormaps I have locally.
+        #Colormaps(uol='factory://xsd.load_xsd_colormaps'),
+        #Colormaps(uol='factory://ncvtk.load_ncvtk_colormaps'),
         VisionModels(uol='import://colormap_explorer.vision_model.colorblind_models'),
         ImageData(uol='factory://colormap_explorer.example_images.all_images'),
     ]

File colormap_explorer/plugin/model_plugin_implementation.py

         model = ModelService()
 
         # Set up the standard choices for colorspaces.
-        model.pipeline_handler.input_colorspaces = [sRGB]
+        if False:
+            # XXX: my profiles.
+            import lcms
+            from colormap_explorer.device_colorspace import DeviceColorspace, ProofingColorspace
+            my_monitor = lcms.FileProfile('/Users/rkern/hg/colormap_explorer/data/MyMonitor.icc')
+            my_printer = lcms.FileProfile('/Users/rkern/hg/colormap_explorer/data/MyPrinter.icc')
+            monitor_device = DeviceColorspace(device_profile=my_monitor)
+            printer_proof = ProofingColorspace(proofing_profile=my_printer)
+            monitor_proof = ProofingColorspace(proofing_profile=my_monitor)
+            extra_inputs = []
+            extra_outputs = [monitor_device]
+            extra_coordinates = [monitor_device]
+            extra_proofs = [monitor_proof, printer_proof]
+        else:
+            extra_inputs = []
+            extra_outputs = []
+            extra_coordinates = []
+            extra_proofs = []
+        model.pipeline_handler.input_colorspaces = [sRGB] + extra_inputs
         model.pipeline.input_colorspace = sRGB
-        model.pipeline_handler.output_colorspaces = [sRGB]
+        model.pipeline_handler.output_colorspaces = [sRGB] + extra_outputs
         model.pipeline.output_colorspace = sRGB
-        model.pipeline_handler.coordinate_colorspaces = [Luv, Lab, XYZ, sRGB]
+        model.pipeline_handler.coordinate_colorspaces = [Luv, Lab, XYZ, sRGB] + extra_coordinates
         model.pipeline.coordinate_colorspace = Luv
         model.pipeline.vision_model = VisionModel()
         model.pipeline_handler.vision_models = [model.pipeline.vision_model]
+        model.pipeline_handler.proofing_colorspaces = extra_proofs
+        if extra_proofs:
+            model.pipeline.proofing_colorspace = extra_proofs[0]
 
         # Get all of the contributed colormaps and add them to the database.
         all_cmaps = self.application.get_extensions(Colormaps)