示例#1
0
        /// <summary>
        /// Reinterpret an image tensor as a volume of colors with supplied color intent.
        /// </summary>
        public static Volume <Td, Tv> GetVolume <Td, Tv>(this Tensor4 <Td> tensor4, Symbol intent)
        {
            var volume = tensor4.SubXYZVolumeWindow <Tv>(0L);

            volume.Accessors = TensorAccessors.Get <Td, Tv>(typeof(Td), typeof(Tv),
                                                            intent, tensor4.DeltaArray);
            return(volume);
        }
示例#2
0
        /// <summary>
        /// Reinterpret an image volume as a matrix of colors with supplied color intent.
        /// </summary>
        public static Matrix <Td, Tv> GetMatrix <Td, Tv>(this Volume <Td> volume, Symbol intent)
        {
            var matrix = volume.SubXYMatrixWindow <Tv>(0L);

            matrix.Accessors = TensorAccessors.Get <Td, Tv>(typeof(Td), typeof(Tv),
                                                            intent, volume.DeltaArray);
            return(matrix);
        }