static void Main() { XmlPresetReader reader = new XmlPresetReader(); PresetInformation pi = reader.ReadXmlFile("Abd_shaded_A.xml"); Console.ReadKey(); Console.WriteLine(pi.Series[0].ToString()); }
//wizualizacja 3d ----------------------------------------------------------------- public Visualization3D(RenderWindowControl window, DicomLoader dicomLoader, Chart chart) { _chart = chart; _window = window; _dicomLoader = dicomLoader; PresetReader = new XmlPresetReader(); // Create a mapper and actor _mapper = vtkSmartVolumeMapper.New(); _mapper.SetInput(_dicomLoader.GetOutput()); _volume = vtkVolume.New(); SetOpacityFunction(); SetGradientOpacity(); _volume.SetMapper(_mapper); renderer = vtkRenderer.New(); renderer.AddVolume(_volume); _window.RenderWindow.GetRenderers().RemoveAllItems(); _window.RenderWindow.AddRenderer(renderer); _window.RenderWindow.GetRenderers().GetFirstRenderer().AddVolume(_volume); // An interactor _renderWindowInteractor = vtkRenderWindowInteractor.New(); _renderWindowInteractor.SetRenderWindow(_window.RenderWindow); //Camera style vtkInteractorStyleTrackballCamera style = vtkInteractorStyleTrackballCamera.New(); style.AutoAdjustCameraClippingRangeOff(); _renderWindowInteractor.SetInteractorStyle(style); //Create and setup planes PlaneWidgetX = new PlaneWidget(Axis.X); SetupPlane(PlaneWidgetX); PlaneWidgetY = new PlaneWidget(Axis.Y); SetupPlane(PlaneWidgetY); PlaneWidgetZ = new PlaneWidget(Axis.Z); SetupPlane(PlaneWidgetZ); // Render _window.RenderWindow.Render(); //ClipingModule _clipingModule = new ClipingModule(GetObjectSize()); }