How to access variables with the Global Lab Image/2 API
GLI/2 & DTVF API Example Code, Global Lab Image/2" "In building a custom tool, I would like to access the variables within GLI/2. I am referring to the point and click script variables and variables generated by other tools (for example, the centroid value generated by a blob analysis or the input from a text prompt tool.) The API documentation, explains that it is easy to get pointers of ROIs and images, but did not mention how to access the variables. How can I access the variables in coding?" "The variables in GLI2 are saved in two linked list. The following code sample shows how to get a pointer to the list and how to create a new variable in coding.
//Get Pointers to main apps object lists
m_pCListNumber = (CcList *)::SendMessage( m_hActiveViewport,HL_REQUEST,HLR_SUPPLY_LIST_BY_NAME,(LPARAM)""Number"" );
m_pCListString = (CcList *)::SendMessage( m_hActiveViewport,HL_REQUEST,HLR_SUPPLY_LIST_BY_NAME,(LPARAM)""String"" );
if( m_pCListNumber-GetViaName("MyVariable") == NULL )
CNumber = new CcNumber();
if(CNumber == NULL) return(-1);