Commit 83646392 authored by Rashad Kanavath's avatar Rashad Kanavath

Merge branches 'develop' and 'app_domain_transform' of...

Merge branches 'develop' and 'app_domain_transform' of https://git.orfeo-toolbox.org/git/otb into app_domain_transform
parents 3fd33abf e499e2a4
......@@ -67,8 +67,8 @@ HEADERS[ LayerStackItemModel::COLUMN_COUNT ] =
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Res" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Name" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Effect" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "I" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "J" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Column" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Line" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Red" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Green" ),
QT_TRANSLATE_NOOP( "mvd::LayerStackItemModel", "Blue" ),
......
......@@ -92,24 +92,10 @@ public:
std::vector<int> GetSelectedItems()
{
if( m_SelectedNames.size() != 0 )
{
this->SetSelectedItemsByNames();
}
else if( m_SelectedKeys.size() != 0 )
{
this->SetSelectedItemsByKeys();
}
return m_SelectedItems;
}
void SetSelectedNames(std::vector<std::string> selectedNames)
{
m_SelectedNames = selectedNames;
m_SelectedItems.clear();
m_SelectedKeys.clear();
}
void SetSelectedNames(std::vector<std::string> selectedNames);
std::vector<std::string> GetSelectedNames()
{
......@@ -117,22 +103,21 @@ public:
}
void SetSelectedKeys(std::vector<std::string> selectedKeys)
{
m_SelectedKeys = selectedKeys;
m_SelectedItems.clear();
m_SelectedNames.clear();
}
void SetSelectedKeys(std::vector<std::string> selectedKeys);
std::vector<std::string> GetSelectedKeys()
{
return m_SelectedKeys;
}
/** Set selected items using a lit of selected keys. */
void SetSelectedItemsByKeys();
/** Set selected items using a lit of selected names. */
void SetSelectedItemsByNames();
/** Set selected items using a lit of selected keys.
* OBSOLETE : this method is not needed anymore and does nothing. */
void SetSelectedItemsByKeys(){}
/** Set selected items using a lit of selected names.
* OBSOLETE : this method is not needed anymore and does nothing. */
void SetSelectedItemsByNames(){}
void SetSelectedItems(std::vector<std::string> selectedItems)
{
std::vector<int> items;
......@@ -140,14 +125,22 @@ public:
{
items.push_back( atoi( selectedItems[i].c_str() ) );
}
m_SelectedItems = items;
m_SelectedNames.clear();
m_SelectedKeys.clear();
this->SetSelectedItems(items);
}
void SetSelectedItems(std::vector<int> selectedItems)
{
m_SelectedItems = selectedItems;
m_SelectedNames.clear();
m_SelectedKeys.clear();
// update selected names and keys
std::vector<std::string> names = this->GetChoiceNames();
std::vector<std::string> keys = this->GetChoiceKeys();
for (unsigned int i=0 ; i<m_SelectedItems.size() ; i++)
{
m_SelectedNames.push_back(names[m_SelectedItems[i]]);
m_SelectedKeys.push_back(keys[m_SelectedItems[i]]);
}
}
protected:
......
......@@ -210,8 +210,8 @@ ComplexOutputImageParameter::GetWriter()
// 0 : image
// 1 : VectorImage
if ( dynamic_cast<FloatVectorImageType*>( m_Image.GetPointer()) ||
dynamic_cast<DoubleVectorImageType*>(m_Image.GetPointer()))
if ( dynamic_cast<ComplexFloatVectorImageType*>( m_Image.GetPointer()) ||
dynamic_cast<ComplexDoubleVectorImageType*>(m_Image.GetPointer()))
{
type = 1;
}
......
......@@ -145,14 +145,15 @@ ListViewParameter::ClearChoices()
m_ChoiceList.clear();
}
void
ListViewParameter::SetSelectedItemsByNames()
ListViewParameter::SetSelectedNames(std::vector<std::string> selectedNames)
{
std::vector<int> selectedItems;
std::vector<std::string> names = this->GetChoiceNames();
for(unsigned int i=0; i<m_SelectedNames.size(); i++)
for(unsigned int i=0; i<selectedNames.size(); i++)
{
const std::string selectedName = m_SelectedNames[i];
const std::string selectedName = selectedNames[i];
unsigned int j(0);
for(; j<names.size(); j++)
{
......@@ -182,13 +183,13 @@ ListViewParameter::SetSelectedItemsByNames()
void
ListViewParameter::SetSelectedItemsByKeys()
ListViewParameter::SetSelectedKeys(std::vector<std::string> selectedKeys)
{
std::vector<int> selectedItems;
std::vector<std::string> keys = this->GetChoiceKeys();
for(unsigned int i=0; i<m_SelectedKeys.size(); i++)
for(unsigned int i=0; i<selectedKeys.size(); i++)
{
const std::string selectedKey = m_SelectedKeys[i];
const std::string selectedKey = selectedKeys[i];
unsigned int j(0);
std::ostringstream oss;
for(; j<keys.size(); j++)
......
......@@ -97,6 +97,10 @@ void QtWidgetListViewParameter::SelectedItems()
}
}
m_ListViewParam->SetSelectedItems(m_SelectedItems);
// make sure parameter is enabled
m_ListViewParam->SetActive(true);
m_ListViewParam->SetUserValue(true);
}
}
......
......@@ -156,6 +156,7 @@ ExternalProject_Add(ITK
-DITK_USE_SYSTEM_ZLIB:BOOL=ON
-DITK_USE_SYSTEM_TIFF:BOOL=ON
-DITK_USE_SYSTEM_PNG:BOOL=ON
-DITK_FORBID_DOWNLOADS:BOOL=ON
${ITK_SB_CONFIG}
DEPENDS ${ITK_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment