Commit 54333266 authored by Stephen Thompson's avatar Stephen Thompson

Issue #1 implemented map view

parent 3eea4a90
......@@ -12,7 +12,7 @@
"bounding box" : [0.0, 640.0, 0.0, 480.0, -100.0, 0.0]
},
"targets" : "data/patches",
"target" : "data/patches",
"map" : "data/full",
"model to world" : "configuration/model_to_world.txt",
"logo" : false,
......
......@@ -166,6 +166,9 @@ def add_map(config):
model.mapper.Update()
model.actor.SetMapper(model.mapper)
model.actor.GetProperty().SetRepresentationToWireframe()
model.actor.GetProperty().SetColor(0.7, 0.7, 0.7)
model.actor.GetProperty().SetOpacity(1.0)
model.actor.GetProperty().SetBackfaceCulling(False)
return models
......
......@@ -5,7 +5,8 @@ from math import isnan
from sksurgeryutils.common_overlay_apps import OverlayBaseApp
from sksurgeryvtk.text.text_overlay import VTKCornerAnnotation
from sksurgeryeval.algorithms.algorithms import (
configure_tracker, populate_models, np2vtk, point_in_locator)
configure_tracker, populate_models, np2vtk, point_in_locator,
add_map)
from sksurgeryeval.algorithms.background_image import \
OverlayBackground
from sksurgeryeval.shapes.cone import VTKConeModel
......@@ -37,10 +38,13 @@ class OverlayApp(OverlayBaseApp):
self._tracker = configure_tracker(config.get("tracker config"))
models, self._locators = populate_models(config)
maps = add_map(config)
self._pointer = VTKConeModel(5.0, 2.5, (1.0, 1.0, 1.0), "pointer")
self._pointer = VTKConeModel(10.0, 5.0, (1.0, 1.0, 1.0), "pointer")
self.vtk_overlay_window.add_vtk_actor(self._pointer.actor)
self.vtk_overlay_window.add_vtk_models(models)
if maps is not None:
self.vtk_overlay_window.add_vtk_models(maps)
if "camera" in config:
camera_config = config.get("camera")
......
......@@ -24,7 +24,7 @@ def test_populate_models():
Tests that populate models function reads data from
a directory and returns a list of polydata and pointlocators
"""
config = { "target" : "data/patches" }
config = {"target" : "data/patches"}
models, locators = populate_models(config)
point_in, _ = point_in_locator((570.0, 270.0, -1386.0),
locators, 3.0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment