Last active
August 15, 2017 04:54
-
-
Save immengineer/4b25df119a638ccf7580be405ce478ff to your computer and use it in GitHub Desktop.
JAISDK PixelFormatを指定して画像取得 PixelFormatの一覧取得
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void GetPixelFormat() | |
{ | |
if (null == myCamera) | |
{ | |
return; | |
} | |
if (comboBox1.Items.Count > 0) comboBox1.Items.Clear(); | |
myPixelFormatNode = myCamera.GetNode("PixelFormat"); | |
if (myPixelFormatNode != null) | |
{ | |
for (int i = 0; i < myPixelFormatNode.EnumValues.Length; i++) | |
{ | |
if (myPixelFormatNode.EnumValues[i].IsAvailable) | |
{ | |
comboBox1.Items.Add(myPixelFormatNode.EnumValues[i].DisplayName); | |
} | |
} | |
for (int i = 0; i < comboBox1.Items.Count; i++) | |
{ | |
if (comboBox1.Items[i].ToString() == myPixelFormatNode.Value.ToString()) | |
{ | |
comboBox1.SelectedIndex = i; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
8行目追加 これが無いとSerchButtonする毎にPixelFormatがどんどん追加されていってしまう