private void AddLayers(DrawArgs args) { IAssociatedTissues volume = args.SceneGraph.ParentPresentationImage as IAssociatedTissues; if (volume == null) { return; } GraphicCollection layers = volume.TissueLayers; vtkPropCollection props = _vtkRenderer.GetViewProps(); foreach (VolumeGraphic volumeGraphic in layers) { if (props.IsItemPresent(volumeGraphic.VtkProp) == 0) { _vtkRenderer.AddViewProp(volumeGraphic.VtkProp); } //if (volumeLayer.OldVtkProp != null) //{ // if (props.IsItemPresent(volumeLayer.OldVtkProp) != 0) // { // props.RemoveItem(volumeLayer.OldVtkProp); // volumeLayer.OldVtkProp = null; // } //} } }
private void AddLayers(DrawArgs args) { IAssociatedTissues volume = args.SceneGraph.ParentPresentationImage as IAssociatedTissues; if (volume == null) { return; } GraphicCollection layers = volume.TissueLayers; vtkPropCollection props = _vtkRenderer.GetViewProps(); foreach (var graphic in layers) { var volumeGraphic = (VolumeGraphic)graphic; if (props.IsItemPresent(volumeGraphic.VtkProp) == 0) { _vtkRenderer.AddViewProp(volumeGraphic.VtkProp); } } }