From: Leonardo Florez-Valencia Date: Tue, 9 Feb 2016 14:48:52 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~249 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1bf710541f1f708f9000096a8d516596bf009d6d;p=cpPlugins.git ... --- diff --git a/lib/cpPipelineEditor/Block.cxx b/lib/cpPipelineEditor/Block.cxx index 61938a7..3d3c0f8 100644 --- a/lib/cpPipelineEditor/Block.cxx +++ b/lib/cpPipelineEditor/Block.cxx @@ -38,7 +38,7 @@ Block( TFilter* filter, QGraphicsItem* parent, QGraphicsScene* scene ) this->m_Height = this->m_VertMargin; // Configure names - this->setNamePort( this->m_Filter->GetName( ) ); + this->setNamePort( this->m_Filter->GetClassName( ) ); // TODO this->_setTypeInfo( this->m_Filter->GetClassName( ) ); // Add input ports diff --git a/lib/cpPipelineEditor/Editor.cxx b/lib/cpPipelineEditor/Editor.cxx index 7dc6251..e15b68d 100644 --- a/lib/cpPipelineEditor/Editor.cxx +++ b/lib/cpPipelineEditor/Editor.cxx @@ -222,7 +222,7 @@ _createBlock( TFilter* f, const QPointF& pnt ) } // rof // Keep a trace of this visual graph - this->m_Graph->SetVertex( f->GetName( ), b ); + // TODO: this->m_Graph->SetVertex( f->GetName( ), b ); return( b ); } diff --git a/lib/cpPlugins/Interface/Interface.cxx b/lib/cpPlugins/Interface/Interface.cxx index 65b7e0f..4db8f77 100644 --- a/lib/cpPlugins/Interface/Interface.cxx +++ b/lib/cpPlugins/Interface/Interface.cxx @@ -163,11 +163,7 @@ CreateObject( const std::string& name ) const this->m_Providers[ classIt->second ] ); if( provider != NULL ) - { po = provider->create( ); - po->SetName( name ); - - } // fi catIt = this->m_Classes.end( ); } else diff --git a/lib/cpPlugins/Interface/ParametersQtDialog.cxx b/lib/cpPlugins/Interface/ParametersQtDialog.cxx index 32cd8c4..409f4e7 100644 --- a/lib/cpPlugins/Interface/ParametersQtDialog.cxx +++ b/lib/cpPlugins/Interface/ParametersQtDialog.cxx @@ -299,7 +299,10 @@ _updateWidgets( ) // Set dialog title auto filter = this->m_Parameters->GetProcessObject( ); std::stringstream title; - title << "Parameters for \"" << filter->GetName( ) << "\""; + title + << "Parameters for an object of class \"" + << filter->GetClassName( ) + << "\""; this->m_Title->setText( title.str( ).c_str( ) ); // Put values diff --git a/lib/cpPlugins/Interface/ProcessObject.cxx b/lib/cpPlugins/Interface/ProcessObject.cxx index f012f57..1d92298 100644 --- a/lib/cpPlugins/Interface/ProcessObject.cxx +++ b/lib/cpPlugins/Interface/ProcessObject.cxx @@ -43,10 +43,10 @@ GetNumberOfOutputs( ) const // ------------------------------------------------------------------------- cpPlugins::Interface:: -ProcessObjectPort& cpPlugins::Interface::ProcessObject:: +OutputProcessObjectPort& cpPlugins::Interface::ProcessObject:: GetOutput( const std::string& id ) { - static ProcessObjectPort null_port; + static OutputProcessObjectPort null_port; auto i = this->m_Outputs.find( id ); if( i == this->m_Outputs.end( ) ) { @@ -59,10 +59,10 @@ GetOutput( const std::string& id ) // ------------------------------------------------------------------------- const cpPlugins::Interface:: -ProcessObjectPort& cpPlugins::Interface::ProcessObject:: +OutputProcessObjectPort& cpPlugins::Interface::ProcessObject:: GetOutput( const std::string& id ) const { - static const ProcessObjectPort null_port; + static const OutputProcessObjectPort null_port; auto i = this->m_Outputs.find( id ); if( i == this->m_Outputs.end( ) ) return( null_port ); @@ -72,7 +72,7 @@ GetOutput( const std::string& id ) const // ------------------------------------------------------------------------- bool cpPlugins::Interface::ProcessObject:: -SetInput( const std::string& id, const ProcessObjectPort& port ) +SetInput( const std::string& id, const OutputProcessObjectPort& port ) { auto i = this->m_Inputs.find( id ); if( i != this->m_Inputs.end( ) ) @@ -106,7 +106,7 @@ DisconnectOutputs( ) auto i = this->m_Outputs.begin( ); for( ; i != this->m_Outputs.end( ); ++i ) if( i->second.IsValid( ) ) - i->second->DisconnectPipeline( ); + i->second->DisconnectFromPipeline( ); this->Modified( ); } @@ -200,13 +200,14 @@ cpPlugins::Interface::ProcessObject:: // ------------------------------------------------------------------------- void cpPlugins::Interface::ProcessObject:: -_AddInput( const std::string& name ) +_AddInput( const std::string& name, bool required ) { - typedef typename _TDataContainer::value_type _TValue; + typedef typename _TInputs::value_type _TValue; auto i = this->m_Inputs.find( name ); if( i == this->m_Inputs.end( ) ) { - i = this->m_Inputs.insert( _TValue( name, NULL ) ).first; + InputProcessObjectPort new_port( required ); + this->m_Inputs[ name ] = new_port; this->Modified( ); } // fi diff --git a/lib/cpPlugins/Interface/ProcessObject.h b/lib/cpPlugins/Interface/ProcessObject.h index e99e8fc..9489c35 100644 --- a/lib/cpPlugins/Interface/ProcessObject.h +++ b/lib/cpPlugins/Interface/ProcessObject.h @@ -61,8 +61,8 @@ namespace cpPlugins unsigned int GetNumberOfInputs( ) const; unsigned int GetNumberOfOutputs( ) const; - ProcessObjectPort& GetOutput( const std::string& id ); - const ProcessObjectPort& GetOutput( const std::string& id ) const; + OutputProcessObjectPort& GetOutput( const std::string& id ); + const OutputProcessObjectPort& GetOutput( const std::string& id ) const; template< class T > inline T* GetInputData( const std::string& id ); @@ -73,7 +73,9 @@ namespace cpPlugins template< class T > inline const T* GetOutputData( const std::string& id ) const; - bool SetInput( const std::string& id, const ProcessObjectPort& port ); + bool SetInput( + const std::string& id, const OutputProcessObjectPort& port + ); void DisconnectInputs( ); void DisconnectOutputs( ); @@ -103,9 +105,10 @@ namespace cpPlugins Self& operator=( const Self& ); protected: - typedef std::map< std::string, ProcessObjectPort > _TDataContainer; - _TDataContainer m_Inputs; - _TDataContainer m_Outputs; + typedef std::map< std::string, InputProcessObjectPort > _TInputs; + typedef std::map< std::string, OutputProcessObjectPort > _TOutputs; + _TInputs m_Inputs; + _TOutputs m_Outputs; Parameters::Pointer m_Parameters; itk::ModifiedTimeType m_LastExecutionTime; diff --git a/lib/cpPlugins/Interface/ProcessObject.hxx b/lib/cpPlugins/Interface/ProcessObject.hxx index 9c5b764..ccddc04 100644 --- a/lib/cpPlugins/Interface/ProcessObject.hxx +++ b/lib/cpPlugins/Interface/ProcessObject.hxx @@ -54,7 +54,6 @@ template< class O > void cpPlugins::Interface::ProcessObject:: _AddOutput( const std::string& name ) { - typedef typename _TDataContainer::value_type _TValue; auto i = this->m_Outputs.find( name ); if( i == this->m_Outputs.end( ) ) { diff --git a/lib/cpPlugins/Interface/Workspace.cxx b/lib/cpPlugins/Interface/Workspace.cxx index c56897e..0abe927 100644 --- a/lib/cpPlugins/Interface/Workspace.cxx +++ b/lib/cpPlugins/Interface/Workspace.cxx @@ -119,7 +119,6 @@ CreateFilter( const std::string& filter, const std::string& name ) TFilter::Pointer f = this->m_Plugins->CreateObject( filter ); if( f.IsNotNull( ) ) { - f->SetName( name ); f->SetSingleInteractor( this->m_SingleInteractor ); f->SetMPRViewer( this->m_MPRViewer ); @@ -137,14 +136,7 @@ CreateFilter( const std::string& filter, const std::string& name ) bool cpPlugins::Interface::Workspace:: RenameFilter( const std::string& old_name, const std::string& new_name ) { - if( this->m_Graph->RenameVertex( old_name, new_name ) ) - { - TFilter* f = this->GetFilter( new_name ); - f->SetName( new_name ); - return( true ); - } - else - return( false ); + return( this->m_Graph->RenameVertex( old_name, new_name ) ); } // ------------------------------------------------------------------------- @@ -226,15 +218,15 @@ Connect( // ------------------------------------------------------------------------- bool cpPlugins::Interface::Workspace:: Connect( - const ProcessObjectPort& input_port, const std::string& exposed_port + const OutputProcessObjectPort& port, const std::string& exposed_port ) { - auto port = this->m_ExposedInputPorts.find( exposed_port ); - if( port != this->m_ExposedInputPorts.end( ) ) + auto i = this->m_ExposedInputPorts.find( exposed_port ); + if( i != this->m_ExposedInputPorts.end( ) ) { - TFilter* filter = this->GetFilter( port->second.first ); + TFilter* filter = this->GetFilter( i->second.first ); if( filter != NULL ) - return( filter->SetInput( port->second.second, input_port ) ); + return( filter->SetInput( i->second.second, port ) ); else return( false ); } diff --git a/lib/cpPlugins/Interface/Workspace.h b/lib/cpPlugins/Interface/Workspace.h index be85418..dedb8b4 100644 --- a/lib/cpPlugins/Interface/Workspace.h +++ b/lib/cpPlugins/Interface/Workspace.h @@ -93,7 +93,7 @@ namespace cpPlugins const std::string& output_name, const std::string& input_name ); bool Connect( - const ProcessObjectPort& input_port, const std::string& exposed_port + const OutputProcessObjectPort& port, const std::string& exposed_port ); void RemoveConnection( const std::string& dest_filter, const std::string& input_name diff --git a/lib/cpPlugins/Interface/WorkspaceIO.cxx b/lib/cpPlugins/Interface/WorkspaceIO.cxx index dcf6c68..f811a5e 100644 --- a/lib/cpPlugins/Interface/WorkspaceIO.cxx +++ b/lib/cpPlugins/Interface/WorkspaceIO.cxx @@ -117,7 +117,7 @@ SaveWorkspace( const std::string& fname ) const { TiXmlElement* e = new TiXmlElement( "filter" ); e->SetAttribute( "class", filter->GetClassName( ) ); - e->SetAttribute( "name", filter->GetName( ) ); + e->SetAttribute( "name", vIt->first.c_str( ) ); e->SetAttribute( "ViewX", filter->GetViewX( ) ); e->SetAttribute( "ViewY", filter->GetViewY( ) ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/AppendMeshesFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/AppendMeshesFilter.cxx index 9121540..8ea4154 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/AppendMeshesFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/AppendMeshesFilter.cxx @@ -8,8 +8,8 @@ cpPlugins::BasicFilters::AppendMeshesFilter:: AppendMeshesFilter( ) : Superclass( ) { - this->_AddInput( "Input0" ); - this->_AddInput( "Input1" ); + this->_AddInput( "Input0", true ); + this->_AddInput( "Input1", true ); this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); } diff --git a/lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx index 1bab79d..91402f5 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx @@ -10,7 +10,7 @@ cpPlugins::BasicFilters::BinaryErodeImageFilter:: BinaryErodeImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsUint( "Radius" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx index 5f159ce..9892679 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::BinaryThresholdImageFilter:: BinaryThresholdImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsReal( "LowerThresholdValue" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx index fcb0269..a0b051d 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx @@ -13,8 +13,8 @@ cpPlugins::BasicFilters::Cutter:: Cutter( ) : Superclass( ) { - this->_AddInput( "InputMesh" ); - this->_AddInput( "InputFunction" ); + this->_AddInput( "InputMesh", true ); + this->_AddInput( "InputFunction", true ); this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); } diff --git a/lib/cpPlugins/Plugins/BasicFilters/ExtractSliceImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/ExtractSliceImageFilter.cxx index de00779..0e553fd 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/ExtractSliceImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/ExtractSliceImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::ExtractSliceImageFilter:: ExtractSliceImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsUint( "Axis" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/InputDataReproducer.cxx b/lib/cpPlugins/Plugins/BasicFilters/InputDataReproducer.cxx index 957136d..022d469 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/InputDataReproducer.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/InputDataReproducer.cxx @@ -5,7 +5,7 @@ cpPlugins::BasicFilters::InputDataReproducer:: InputDataReproducer( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::DataObject >( "Output" ); this->m_Parameters->Clear( ); } diff --git a/lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.cxx index 4dfcd5a..6877a3d 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.cxx @@ -194,7 +194,7 @@ MacheteFilter( ) : Superclass( ), m_PlaneWidget( NULL ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::DataObject >( "PositiveOutput" ); this->_AddOutput< cpPlugins::Interface::DataObject >( "NegativeOutput" ); @@ -285,17 +285,12 @@ _RealImage( itk::DataObject* dobj ) filter->SetOutsideValue( _TPixel( 0 ) ); filter->Update( ); - // Get output names - auto pos_name = this->GetOutputData< _TObj >( "PositiveOutput" )->GetName( ); - auto neg_name = this->GetOutputData< _TObj >( "NegativeOutput" )->GetName( ); - // Connect outputs (and correct their types and names) _TImage* pos_out = this->GetOutputData< _TImage >( "PositiveOutput" ); if( pos_out == NULL ) { this->_AddOutput< _TImage >( "PositiveOutput" ); pos_out = this->GetOutputData< _TImage >( "PositiveOutput" ); - pos_out->SetName( pos_name ); } // fi _TImage* neg_out = this->GetOutputData< _TImage >( "NegativeOutput" ); @@ -303,7 +298,6 @@ _RealImage( itk::DataObject* dobj ) { this->_AddOutput< _TImage >( "NegativeOutput" ); neg_out = this->GetOutputData< _TImage >( "NegativeOutput" ); - neg_out->SetName( neg_name ); } // fi diff --git a/lib/cpPlugins/Plugins/BasicFilters/MacheteImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/MacheteImageFilter.cxx index a488ba9..772b9c2 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MacheteImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MacheteImageFilter.cxx @@ -12,7 +12,7 @@ cpPlugins::BasicFilters::MacheteImageFilter:: MacheteImageFilter() : Superclass() { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >("Output"); this->m_Parameters->ConfigureAsReal("Radius"); diff --git a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx index 95ede25..0203b09 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx @@ -11,7 +11,7 @@ cpPlugins::BasicFilters::MarchingCubes:: MarchingCubes( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); this->m_Parameters->ConfigureAsRealList( "Thresholds" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx index 02eed73..2e4c763 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::MedianImageFilter:: MedianImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsUint( "Radius" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx index 3a3f12c..0c4852b 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::OtsuThresholdImageFilter:: OtsuThresholdImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsUint( "NumberOfHistogramBins" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/RGBImageToOtherChannelsFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/RGBImageToOtherChannelsFilter.cxx index f06cda8..700043d 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/RGBImageToOtherChannelsFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/RGBImageToOtherChannelsFilter.cxx @@ -13,7 +13,7 @@ RGBImageToOtherChannelsFilter( ) { typedef cpPlugins::Interface::Parameters TParameters; - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); std::vector< std::string > choices; diff --git a/lib/cpPlugins/Plugins/BasicFilters/SignedMaurerDistanceMapImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/SignedMaurerDistanceMapImageFilter.cxx index 1487e38..4748675 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/SignedMaurerDistanceMapImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/SignedMaurerDistanceMapImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::SignedMaurerDistanceMapImageFilter:: SignedMaurerDistanceMapImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsReal( "BackgroundValue" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx b/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx index 53e39f0..df01a69 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx @@ -10,7 +10,7 @@ cpPlugins::BasicFilters::SphereMeshSource:: SphereMeshSource( ) : Superclass( ) { - // TODO: this->_AddInput( "Center" ); + this->_AddInput( "Center", false ); this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); this->m_Parameters->ConfigureAsReal( "Radius" ); diff --git a/lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx index 8ede24e..e380029 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx @@ -10,7 +10,7 @@ cpPlugins::BasicFilters::TriangleMeshToBinaryImageFilter:: TriangleMeshToBinaryImageFilter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsUint( "InsideValue" ); diff --git a/lib/cpPlugins/Plugins/IO/ImageReader.cxx b/lib/cpPlugins/Plugins/IO/ImageReader.cxx index cd0d6c9..66231c4 100644 --- a/lib/cpPlugins/Plugins/IO/ImageReader.cxx +++ b/lib/cpPlugins/Plugins/IO/ImageReader.cxx @@ -332,13 +332,11 @@ _RealGD( const TStringList& names ) { reader->Update( ); out->SetITK< I >( reader->GetOutput( ) ); - out->SetName( names[ 0 ] ); } catch( itk::ExceptionObject& err ) { r = "ImageReader: " + std::string( err.GetDescription( ) ); out->SetITK< I >( NULL ); - out->SetName( "" ); } // yrt } @@ -353,13 +351,11 @@ _RealGD( const TStringList& names ) { reader->Update( ); out->SetITK< I >( reader->GetOutput( ) ); - out->SetName( names[ 0 ] ); } catch( itk::ExceptionObject& err ) { r = "ImageReader: " + std::string( err.GetDescription( ) ); out->SetITK< I >( NULL ); - out->SetName( "" ); } // yrt } diff --git a/lib/cpPlugins/Plugins/IO/ImageWriter.cxx b/lib/cpPlugins/Plugins/IO/ImageWriter.cxx index df72f66..29334e1 100644 --- a/lib/cpPlugins/Plugins/IO/ImageWriter.cxx +++ b/lib/cpPlugins/Plugins/IO/ImageWriter.cxx @@ -8,7 +8,7 @@ cpPlugins::IO::ImageWriter:: ImageWriter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->m_Parameters->ConfigureAsSaveFileName( "FileName" ); this->m_Parameters->SetAcceptedFileExtensions( "FileName", diff --git a/lib/cpPlugins/Plugins/IO/MeshWriter.cxx b/lib/cpPlugins/Plugins/IO/MeshWriter.cxx index b0b7227..46f9833 100644 --- a/lib/cpPlugins/Plugins/IO/MeshWriter.cxx +++ b/lib/cpPlugins/Plugins/IO/MeshWriter.cxx @@ -10,7 +10,7 @@ cpPlugins::IO::MeshWriter:: MeshWriter( ) : Superclass( ) { - this->_AddInput( "Input" ); + this->_AddInput( "Input", true ); this->m_Parameters->ConfigureAsSaveFileName( "FileName" ); this->m_Parameters->SetAcceptedFileExtensions( "FileName", diff --git a/lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx b/lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx index 97e96fa..383b4a2 100644 --- a/lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx +++ b/lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx @@ -13,7 +13,7 @@ SeedWidget( ) : Superclass( ), m_Configured( false ) { - this->_AddInput( "ReferenceImage" ); + this->_AddInput( "ReferenceImage", true ); this->_AddOutput< cpPlugins::Interface::PointList >( "Output" ); this->m_Parameters->ConfigureAsBool( "SeedsAreInRealSpace" );