コード例 #1
0
        public void SetSceneRoot(VtkSceneGraph sceneGraphRoot)
        {
            if (!Equals(_sceneGraphRoot, sceneGraphRoot))
            {
                if (_sceneGraphRoot != null)
                {
                    _sceneGraphRoot.DeinitializeSceneGraph(_vtkRenderer);
                    _sceneGraphRoot.Dispose();
                    _sceneGraphRoot = null;
                }

                _vtkRenderer.RemoveAllViewProps();
                _vtkRenderer.ResetCamera();

                _sceneGraphRoot = sceneGraphRoot;

                if (_sceneGraphRoot != null)
                {
                    _sceneGraphRoot.InitializeSceneGraph(_vtkRenderer);
                }
            }
            else
            {
                sceneGraphRoot.Dispose();
            }
        }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_dynamicRenderEventPublisher != null)
                {
                    _dynamicRenderEventPublisher.Cancel();
                    _dynamicRenderEventPublisher.Dispose();
                    _dynamicRenderEventPublisher = null;
                }

                if (_vtkRenderWindow != null)
                {
                    _vtkRenderWindow.Dispose();
                    _vtkRenderWindow = null;
                }

                if (_vtkRenderer != null)
                {
                    _vtkRenderer.Dispose();
                    _vtkRenderer = null;
                }

                if (_sceneGraphRoot != null)
                {
                    _sceneGraphRoot.Dispose();
                    _sceneGraphRoot = null;
                }

                if (_imageBuffer != null)
                {
                    _imageBuffer.Dispose();
                    _imageBuffer = null;
                }

                if (_overlayBuffer != null)
                {
                    _overlayBuffer.Dispose();
                    _overlayBuffer = null;
                }

                if (_finalBuffer != null)
                {
                    _finalBuffer.Dispose();
                    _finalBuffer = null;
                }
            }
        }
コード例 #3
0
		public void SetSceneRoot(VtkSceneGraph sceneGraphRoot)
		{
			if (!Equals(_sceneGraphRoot, sceneGraphRoot))
			{
				if (_sceneGraphRoot != null)
				{
					_sceneGraphRoot.DeinitializeSceneGraph(_vtkRenderer);
					_sceneGraphRoot.Dispose();
					_sceneGraphRoot = null;
				}

				_vtkRenderer.RemoveAllViewProps();
				_vtkRenderer.ResetCamera();

				_sceneGraphRoot = sceneGraphRoot;

				if (_sceneGraphRoot != null)
				{
					_sceneGraphRoot.InitializeSceneGraph(_vtkRenderer);
				}
			}
			else
			{
				sceneGraphRoot.Dispose();
			}
		}
コード例 #4
0
		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_dynamicRenderEventPublisher != null)
				{
					_dynamicRenderEventPublisher.Cancel();
					_dynamicRenderEventPublisher.Dispose();
					_dynamicRenderEventPublisher = null;
				}

				if (_vtkRenderWindow != null)
				{
					_vtkRenderWindow.Dispose();
					_vtkRenderWindow = null;
				}

				if (_vtkRenderer != null)
				{
					_vtkRenderer.Dispose();
					_vtkRenderer = null;
				}

				if (_sceneGraphRoot != null)
				{
					_sceneGraphRoot.Dispose();
					_sceneGraphRoot = null;
				}

				if (_imageBuffer != null)
				{
					_imageBuffer.Dispose();
					_imageBuffer = null;
				}

				if (_overlayBuffer != null)
				{
					_overlayBuffer.Dispose();
					_overlayBuffer = null;
				}

				if (_finalBuffer != null)
				{
					_finalBuffer.Dispose();
					_finalBuffer = null;
				}
			}
		}