IMAQ.CameraController.MultipleSnapshot C# (CSharp) Method

MultipleSnapshot() public method

public MultipleSnapshot ( string attributesPath, int numberOfShots ) : ].byte[][
attributesPath string
numberOfShots int
return ].byte[][
        public byte[][,] MultipleSnapshot(string attributesPath, int numberOfShots)
        {
            SetCameraAttributes(attributesPath);
            VisionImage[] images = new VisionImage[numberOfShots];
            Stopwatch watch = new Stopwatch();
            try
            {

                watch.Start();
                state = CameraState.READY_FOR_ACQUISITION;

                imaqdxSession.Sequence(images, numberOfShots);
                watch.Stop();
                if (windowShowing)
                {
                long interval = watch.ElapsedMilliseconds;
                imageWindow.WriteToConsole(interval.ToString());
                }

                List<byte[,]> byteList = new List<byte[,]>();
                foreach (VisionImage i in images)
                {
                    byteList.Add((i.ImageToArray()).U8);

                   // if (windowShowing)
                    //{
                      //  imageWindow.AttachToViewer(i);

                   // }

                }
                state = CameraState.FREE;

                return byteList.ToArray();

            }
            catch (ImaqdxException e)
            {
                MessageBox.Show(e.Message);
                state = CameraState.FREE;
                throw new TimeoutException();
            }
        }