Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="guid"></param>
        public void RemoveImage(Guid guid)
        {
            ImageDataContract idc;

            _cacheImages.TryRemove(guid, out idc);

            BufferRepository.FreeBuffer(idc.PixelBuffer.Id);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="guid"></param>
        public void RemoveSurfaceMesh(Guid guid)
        {
            SurfaceMeshDataContract smdc;

            _cacheMeshes.TryRemove(guid, out smdc);
            BufferRepository.FreeBuffer(smdc.VertexBuffer.Id);
            BufferRepository.FreeBuffer(smdc.NormalBuffer.Id);
            BufferRepository.FreeBuffer(smdc.TriangleIndexBuffer.Id);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="guid"></param>
        public void RemoveImageVolume(Guid guid)
        {
            UniformImageVolumeDataContract ivdc;

            if (_cacheImageVolumes.TryGetValue(guid, out ivdc))
            {
                _cacheImageVolumes.Remove(guid);
                BufferRepository.FreeBuffer(ivdc.PixelBuffer.Id);
            }
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="guid"></param>
        public void RemoveImage(Guid guid)
        {
            ImageDataContract idc;

            _cacheImages.TryRemove(guid, out idc);

            BufferRepository.FreeBuffer(idc.PixelBuffer.Id);
            //if (_cacheImages.Count == 0)
            //{
            //    System.Diagnostics.Trace.Assert(BufferRepository.GetCount() == 0);
            //}
        }
Esempio n. 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="guid"></param>
        public void RemoveStructure(Guid guid)
        {
            StructureDataContract sdc;

            _cacheStructures.TryRemove(guid, out sdc);
            foreach (var pdcGuid in sdc.Contours)
            {
                PolygonDataContract pdc;
                _cachePolygons.TryRemove(pdcGuid, out pdc);
                BufferRepository.FreeBuffer(pdc.VertexBuffer.Id);
            }
        }