+ QLabel* title = new QLabel( tree_dialog );
+ title->setText( "Choose a DICOM series" );
+ QGridLayout* mainLayout = new QGridLayout( tree_dialog );
+ QVBoxLayout* toolsLayout = new QVBoxLayout( );
+ toolsLayout->addWidget( title );
+ mainLayout->addLayout( toolsLayout, 0, 0, 1, 1 );
+
+ tree_widget->insertTopLevelItems( 0, tree_items );
+ toolsLayout->addWidget( tree_widget );
+
+ QDialogButtonBox* bb = new QDialogButtonBox(
+ QDialogButtonBox::Ok | QDialogButtonBox::Cancel
+ );
+ tree_dialog->connect(
+ bb, SIGNAL( accepted( ) ), tree_dialog, SLOT( accept( ) )
+ );
+ tree_dialog->connect(
+ bb, SIGNAL( rejected( ) ), tree_dialog, SLOT( reject( ) )
+ );
+ toolsLayout->addWidget( bb );
+
+ QApplication::restoreOverrideCursor( );
+ if( parent != NULL )
+ parent->setEnabled( true );
+
+ if( tree_dialog->exec( ) == 0 )
+ return( false );
+
+ QTreeWidgetItem* item = tree_widget->currentItem( );
+ if( item != NULL )
+ {
+ QTreeWidgetItem* item_parent = item->parent( );
+ if( item_parent != NULL )