本文整理汇总了C++中qstringlist::Iterator::toLocal8Bit方法的典型用法代码示例。如果您正苦于以下问题:C++ Iterator::toLocal8Bit方法的具体用法?C++ Iterator::toLocal8Bit怎么用?C++ Iterator::toLocal8Bit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qstringlist::Iterator
的用法示例。
在下文中一共展示了Iterator::toLocal8Bit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void pdp::Toolbar::OpenFile()
{
//std::cout << "hi from " << __FUNCSIG__ << std::endl;
mitk::DataNodeFactory::Pointer nodeReader = mitk::DataNodeFactory::New();
QStringList fileNames;
if(AT_HOME == 1)
{
fileNames = QFileDialog::getOpenFileNames(NULL, "Open", "C:\\DA\\Data\\", "*" );
}
else
{
fileNames = QFileDialog::getOpenFileNames(NULL, "Open", "E:\\Media Informatics\\thesis\\Hendrik_PhanAnh_pdp\\PA_Hendrik\\PA_Hendrik\\pdp\\Hendrik_pdp\\data", "*" );
}
if(!(fileNames.isEmpty()))
{
for(QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); fileName++)
{
if(QFile::exists(fileName->toLocal8Bit().data()))
{
nodeReader->SetFileName(fileName->toLocal8Bit().data());
try
{
nodeReader->Update();
}
catch (itk::ExceptionObject &ex)
{
std::cout << ex << std::endl;
}
catch (std::exception &ex1)
{
ex1.what();
}
// Adding file/image to the DataNode
mitk::DataNode::Pointer node;
node = nodeReader->GetOutput(0);
// Add unique id
int newId = m_ThreeDEditing->GetUniqueId();
node->SetIntProperty("UniqueID", newId);
node->SetBoolProperty("ModifiedThusConvert", mitk::BoolProperty::New(false));
// Surface visualisation
//node->SetFloatProperty("material.wireframeLineWidth", 8.0);
node->ReplaceProperty("line width", mitk::IntProperty::New(3));
m_ThreeDEditing->GetLungDataset()->getDataStore()->Add(node);
m_ThreeDEditing->SetUpMitkView();
}
else
{
std::cout << "Selected file does not exist!\n";
}
}
}
else
{
std::cout << "No file given to the program!\n";
}
// Segmentations should be in the front, the reference image in the back
SetImagesToBottom();
//std::cout << "ciao from " << __FUNCSIG__ << std::endl;
}