示例#1
0
        /// <summary>
        /// Active the specific stream to obtain the image
        /// </summary>
        public void AddStream <T>() where T : ImageStream
        {
            ImageStream newStream = (T)Activator.CreateInstance(typeof(T), new object[] { sensor });

            newStream.Open();

            /* Test if implemented DataProduction<Body[]> */
            DataProduction <Body[]> streamWithBody = newStream as DataProduction <Body[]>;

            if (streamWithBody != null)
            {
                openedBodyStreams.Add(newStream.StreamID, streamWithBody);
            }

            openedStreams.Add(newStream.StreamID, newStream);
        }