<commit_before>/*=========================================================================

  Program   :   OTB (ORFEO ToolBox)
  Authors   :   CNES - <NAME>
  Language  :   C++
  Date      :   7 April 2006
  Version   :   
  Role      :   
  $Id:$

=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#include "itkExceptionObject.h"
#include "itkImage.h"

#include "otbImageFileReader.h"


//  Software Guide : BeginCommandLineArgs
//    1 1
//  Software Guide : EndCommandLineArgs

// Software Guide : BeginLatex
//
// The complex moments can be computed on images, but sometimes we are
// interested in computing them on shapes extracted from images by
// segmentation algorithms. These shapes can be represented by
// \doxygen{itk::Path}s. This example illustrates the use of the
// \doxygen{otb::ComplexMomentPathFunction} for the computation of
// complex geometric moments on ITK paths.
// 
// The first step required to use this filter is to include its header file. 
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
#include "otbComplexMomentPathFunction.h"
// Software Guide : EndCodeSnippet
#include "itkPolyLineParametricPath.h"

int main(int argc, char ** argv )
{
    if( argc != 3 )
    {
    std::cerr << "Usage: " << argv[0];
    std::cerr << " p q" << std::endl;  
    return EXIT_FAILURE;
    }

    unsigned int P((unsigned char)::atoi(argv[2]));
    unsigned int Q((unsigned char)::atoi(argv[3]));

	        
    typedef unsigned char     InputPixelType;


    //  Software Guide : BeginLatex
    //
    //  The \doxygen{otb::ComplexMomentPathFunction} is templated over the
    //  input path type and the output complex type value, so we start by
    //  defining:
    //
    //  Software Guide : EndLatex 
    
    // Software Guide : BeginCodeSnippet

    const   unsigned int      Dimension = 2;
    
    typedef itk::PolyLineParametricPath< Dimension > PathType;
    
    typedef std::complex<double>                             ComplexType;
    typedef otb::ComplexMomentPathFunction<PathType,ComplexType>   CMType;

    CMType::Pointer cmFunction =CMType::New();
    
    // Software Guide : EndCodeSnippet

    PathType::Pointer path = PathType::New();

    path->Initialize();<commit_msg>Bug parametres ComplexMomentPathExample<commit_after>/*=========================================================================

  Program   :   OTB (ORFEO ToolBox)
  Authors   :   CNES - <NAME>
  Language  :   C++
  Date      :   7 April 2006
  Version   :   
  Role      :   
  $Id:$

=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#include "itkExceptionObject.h"
#include "itkImage.h"

#include "otbImageFileReader.h"


//  Software Guide : BeginCommandLineArgs
//    1 1
//  Software Guide : EndCommandLineArgs

// Software Guide : BeginLatex
//
// The complex moments can be computed on images, but sometimes we are
// interested in computing them on shapes extracted from images by
// segmentation algorithms. These shapes can be represented by
// \doxygen{itk::Path}s. This example illustrates the use of the
// \doxygen{otb::ComplexMomentPathFunction} for the computation of
// complex geometric moments on ITK paths.
// 
// The first step required to use this filter is to include its header file. 
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
#include "otbComplexMomentPathFunction.h"
// Software Guide : EndCodeSnippet
#include "itkPolyLineParametricPath.h"

int main(int argc, char ** argv )
{
    if( argc != 3 )
    {
    std::cerr << "Usage: " << argv[0];
    std::cerr << " p q" << std::endl;  
    return EXIT_FAILURE;
    }

    unsigned int P((unsigned char)::atoi(argv[1]));
    unsigned int Q((unsigned char)::atoi(argv[2]));

	        
    typedef unsigned char     InputPixelType;


    //  Software Guide : BeginLatex
    //
    //  The \doxygen{otb::ComplexMomentPathFunction} is templated over the
    //  input path type and the output complex type value, so we start by
    //  defining:
    //
    //  Software Guide : EndLatex 
    
    // Software Guide : BeginCodeSnippet

    const   unsigned int      Dimension = 2;
    
    typedef itk::PolyLineParametricPath< Dimension > PathType;
    
    typedef std::complex<double>                             ComplexType;
    typedef otb::ComplexMomentPathFunction<PathType,ComplexType>   CMType;

    CMType::Pointer cmFunction =CMType::New();
    
    // Software Guide : EndCodeSnippet

    PathType::Pointer path = PathType::New();

    path->Initialize();
{'fraction_non_alphanumeric': 0.16175842936406318, 'fraction_numerical': 0.006828851899274435, 'mean_word_length': 3.037037037037037, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6198644', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1317, 'n_words': 401}