- String = 0,
- Bool,
- Int,
- Uint,
- Real,
- Index,
- Point,
- StringList,
- BoolList,
- IntList,
- UintList,
- RealList,
- IndexList,
- PointList,
- NoType
- };
- */
-
- QHBoxLayout* horizontalLayout = new QHBoxLayout( );
- QLabel* label = new QLabel( this->m_ParametersDlg );
- label->setText( QString( par_name.c_str( ) ) );
- horizontalLayout->addWidget( label );
-
- if( par_type == TParameters::Uint )
- {
- QSpinBox* v_uint =
- new QSpinBox( this->m_ParametersDlg );
- v_uint->setMinimum( 0 );
- v_uint->setMaximum( std::numeric_limits< unsigned long >::max( ) );
- v_uint->setValue( parameters.GetValueAsUint( par_name ) );
- v_uint->setObjectName( QString( par_name.c_str( ) ) );
- horizontalLayout->addWidget( v_uint );
- verticalLayout->addLayout( horizontalLayout );
- }
- else if( par_type == TParameters::Int )
- {
- QSpinBox* v_int =
- new QSpinBox( this->m_ParametersDlg );
- v_int->setMinimum( -std::numeric_limits< long >::max( ) );
- v_int->setMaximum( std::numeric_limits< long >::max( ) );
- v_int->setValue( parameters.GetValueAsInt( par_name ) );
- v_int->setObjectName( QString( par_name.c_str( ) ) );
- horizontalLayout->addWidget( v_int );
- verticalLayout->addLayout( horizontalLayout );
- }
- else if( par_type == TParameters::Real )
+ image = reader->GetOutput< TPluginImage >( 0 );
+ reader->DisconnectOutputs( );
+
+ } // fi
+
+ // Unblock application
+ QApplication::restoreOverrideCursor( );
+ this->setEnabled( true );
+
+ } // fi
+ }
+ else
+ ret = "No suitable reader object found in loaded plugins.";
+
+ return( ret );
+}
+
+// -------------------------------------------------------------------------
+std::string ImageMPR::
+_ConfigureMeshActors( )
+{
+ if( this->m_Mesh.IsNull( ) )
+ return( "Valid mesh not found." );
+
+ this->m_Mesh->CreateVTKActor( );
+ vtkActor* vtk_actor = this->m_Mesh->GetVTKActor( );
+ if( vtk_actor != NULL )
+ {
+ this->m_MPRObjects->Get3DRenderer( )->AddActor( vtk_actor );
+ this->m_MPRObjects->Render( 4 );
+
+ } // fi
+
+ TMPRObjects::TMPRActors* mprActors = this->m_MPRObjects->GetMPRActors( );
+
+ std::string err = "";
+ for( unsigned int i = 0; i < 3; ++i )
+ {
+ this->m_Cutters[ i ] = this->m_Plugins.CreateProcessObject( this->m_MeshCutterClass );
+ this->m_Planes[ i ] = TPluginImplicitFunction::New( );
+ this->m_Planes[ i ]->SetFunction( mprActors->GetSliceActors( i )->GetPlaneFunction( ) );
+ this->m_Cutters[ i ]->SetInput( 0, this->m_Mesh );
+ this->m_Cutters[ i ]->SetInput( 1, this->m_Planes[ i ] );
+ std::string lerr = this->m_Cutters[ i ]->Update( );
+ if( lerr == "" )