/// <summary>
        /// Disposing all elements in visualization 3D.
        /// </summary>
        public bool Dispose()
        {
            if (_volume != null)
            {
                _volume.Dispose();
            }
            if (_dicomLoader != null)
            {
                _dicomLoader.Dispose();
            }
            if (_mapper != null)
            {
                _mapper.Dispose();
            }
            if (PlaneWidgetX != null)
            {
                PlaneWidgetX.Dispose();
            }
            if (PlaneWidgetY != null)
            {
                PlaneWidgetY.Dispose();
            }
            if (PlaneWidgetZ != null)
            {
                PlaneWidgetZ.Dispose();
            }
            if (_window != null)
            {
                _window.Dispose();
            }

            return(true);
        }
Exemplo n.º 2
0
 public void DisposeAll(object sender, FormClosingEventArgs e)
 {
     _vizualization3D.Dispose();
     _firstVizualization2D.Dispose();
     _secondVizualization2D.Dispose();
     _thirdVizualization2D.Dispose();
     _dicomLoader.Dispose();
 }