-typedef itk::Image< TScalar, Dim > TScalarImage;
-
-// -------------------------------------------------------------------------
-/* TODO
- TMap Args;
- TInputImage::PointType global_seed;
- TLabelPixel inside_value = TLabelPixel( 1 );
- TLabelPixel outside_value = TLabelPixel( 0 );
- TLabelPixel inside_label = TLabelPixel( 1 );
- TLabelPixel outside_label = TLabelPixel( 2 );
-*/
-
-// -------------------------------------------------------------------------
-/* TODO
- template< class _TInputPtr, class _TOutputPtr >
- void Label( _TOutputPtr& output, const _TInputPtr& input, const _TOutputPtr& labels )
- {
- typedef typename _TInputPtr::ObjectType _TInput;
- typedef typename _TOutputPtr::ObjectType _TOutput;
- typedef CTBronchi::MoriLabelling< _TInput, _TOutput > _TLabelling;
-
- typename _TLabelling::Pointer labelling = _TLabelling::New( );
- labelling->SetInput( input );
- labelling->SetInputLabels( labels );
- labelling->SetOutsideValue( outside_label );
- labelling->SetInsideValue( inside_label );
- labelling->SetInputInsideValue( inside_value );
- labelling->SetUpperThreshold(
- TInputPixel( std::atof( Args[ "labelling_upper_threshold" ].c_str( ) ) )
- );
- double t = MeasureTime( labelling );
- std::cout << "Labelling executed in " << t << " s" << std::endl;
- output = labelling->GetOutput( );
- TMap::const_iterator i = Args.find( "out_labels" );
- if( i != Args.end( ) )
- WriteImage( output, i->second );
- output->DisconnectPipeline( );
- }
-
- // -------------------------------------------------------------------------
- template< class _TRawPtr, class _TLabelPtr >
- void RandomWalker( _TLabelPtr& output, const _TRawPtr& raw, const _TLabelPtr& labels )
- {
- typedef typename _TRawPtr::ObjectType _TRaw;
- typedef typename _TLabelPtr::ObjectType _TLabel;
- }
-
- // -------------------------------------------------------------------------
- bool ParseArgs( int argc, char* argv[] )
- {
- std::set< std::string > mandatory;
- mandatory.insert( "in" );
- mandatory.insert( "out_segmentation" );
- mandatory.insert( "seed_x" );
- mandatory.insert( "seed_y" );
- mandatory.insert( "seed_z" );
-
- Args[ "mori_minimum_threshold" ] = "-850";
- Args[ "mori_signal_kernel_size" ] = "20";
- Args[ "mori_signal_threshold" ] = "100";
- Args[ "mori_signal_influence" ] = "0.5";
- Args[ "mori_lower_threshold" ] = "-1024";
- Args[ "mori_upper_threshold" ] = "0";
- Args[ "mori_delta_threshold" ] = "1";
- Args[ "labelling_upper_threshold" ] = "-400";
-
- for( int i = 1; i < argc; i += 2 )
- Args[ argv[ i ] + 1 ] = argv[ i + 1 ];
-
- bool complete = true;
- for( std::string t: mandatory )
- complete &= ( Args.find( t ) != Args.end( ) );
-
- if( !complete )
- {
- std::cerr
- << "Usage: " << argv[ 0 ] << std::endl
- << "\t-in filename" << std::endl
- << "\t-out_segmentation filename" << std::endl
- << "\t-seed_x value -seed_y value -seed_z value" << std::endl
- << "\t[-out_mori filename]" << std::endl
- << "\t[-out_signal filename]" << std::endl
- << "\t[-out_labels filename]" << std::endl
- << "\t[-mori_minimum_threshold value]" << std::endl
- << "\t[-mori_signal_kernel_size value]" << std::endl
- << "\t[-mori_signal_threshold value]" << std::endl
- << "\t[-mori_signal_influence value]" << std::endl
- << "\t[-mori_lower_threshold value]" << std::endl
- << "\t[-mori_upper_threshold value]" << std::endl
- << "\t[-mori_delta_threshold value]" << std::endl
- << "\t[-labelling_upper_threshold value]" << std::endl;
- return( false );
-
- } // fi
- return( true );
- }
-*/