Skip to content
Snippets Groups Projects
Commit 32adb052 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: add list view support

parent e0649e4b
Branches
Tags
No related merge requests found
......@@ -151,11 +151,12 @@ ListViewParameter::SetSelectedItemsByNames()
// If not found
if( j==names.size() )
{
itk::OStringStream oss;
for( j=0; j<names.size(); j++)
{
std::cout<<names[j]<<std::endl;
oss<<names[j]<<", ";
}
itkExceptionMacro("Value "<<selectedName<<" not found in the ch888oices possibilities...");
itkExceptionMacro("Value "<<selectedName<<" not found in the choices possibilities"<<oss.str()<<".");
}
}
this->SetSelectedItems(selectedItems);
......@@ -172,6 +173,7 @@ ListViewParameter::SetSelectedItemsByKeys()
{
const std::string selectedKey = m_SelectedKeys[i];
unsigned int j(0);
itk::OStringStream oss;
for( ; j<keys.size(); j++)
{
if( keys[j] == selectedKey )
......@@ -186,8 +188,9 @@ ListViewParameter::SetSelectedItemsByKeys()
for( j=0; j<keys.size(); j++)
{
std::cout<<keys[j]<<std::endl;
oss<<keys[j]<<", ";
}
itkExceptionMacro("Value "<<selectedKey<<" not found in the choices possibilities...")
itkExceptionMacro("Value "<<selectedKey<<" not found in the choices possibilities"<<oss.str()<<".");
}
}
this->SetSelectedItems(selectedItems);
......
......@@ -113,6 +113,7 @@ OutputImageParameter::Write( )
{
m_FloatWriter->SetFileName( this->GetFileName() );
m_FloatWriter->SetInput(this->GetImage());
m_FloatWriter->Modified();
m_FloatWriter->Update();
}
break;
......
......@@ -609,17 +609,8 @@ CommandLineLauncher::DisplayParameterHelp( const Parameter::Pointer & param, con
}
else if( type == ParameterType_ListView )
{
oss<<"\t Type: List of int ";
std::vector<std::string> names = m_Application->GetChoiceNames(paramKey);
for( unsigned int j=0; j<names.size(); j++ )
{
oss << names[j];
if( j<= names.size()-1 )
{
oss << ", ";
}
}
oss << std::endl;
// We don't have access to the possible values...
oss<<"\t Type: List of String" << std::endl;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment