Skip to content
Snippets Groups Projects
Commit 17dc8476 authored by Romain Garrigues's avatar Romain Garrigues
Browse files

MàJ pour compil Windows

parent 92b6f8c6
No related branches found
No related tags found
No related merge requests found
......@@ -55,10 +55,12 @@ public:
typedef typename InputImageType::ConstPointer InputImageConstPointer;
typedef typename InputImageType::RegionType InputImageRegionType;
typedef typename InputImageType::PixelType InputImagePixelType;
/** Some PointSet related typedefs. */
typedef typename Superclass::OutputPointSetType OutputPointSetType;
typedef typename Superclass::OutputPointSetPointer OutputPointSetPointer;
typedef itk::ProcessObject ProcessObjectType;
/** Set the input image of this process object. */
void SetInput(unsigned int idx, const InputImageType *input);
......
......@@ -31,13 +31,13 @@ template <class TInputImage, class TOutputPointSet>
ImageToPointSetFilter<TInputImage,TOutputPointSet>
::ImageToPointSetFilter()
{
this->itk::ProcessObject::SetNumberOfRequiredInputs(1);
this->ProcessObjectType::SetNumberOfRequiredInputs(1);
OutputPointSetPointer output
= dynamic_cast<OutputPointSetType*>(this->MakeOutput(0).GetPointer());
this->itk::ProcessObject::SetNumberOfRequiredOutputs(1);
this->itk::ProcessObject::SetNthOutput(0, output.GetPointer());
ProcessObjectType::SetNumberOfRequiredOutputs(1);
ProcessObjectType::SetNthOutput(0, output.GetPointer());
}
......@@ -76,7 +76,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
{
// process object is not const-correct, the const_cast
// is required here.
this->itk::ProcessObject::SetNthInput(idx,
this->ProcessObjectType::SetNthInput(idx,
const_cast< InputImageType * >(input) );
}
......@@ -91,7 +91,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
::GetInput(unsigned int idx)
{
return dynamic_cast<const InputImageType*>
(this->itk::ProcessObject::GetInput(idx));
(this->ProcessObjectType::GetInput(idx));
}
......@@ -104,7 +104,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
::GetOutput(void)
{
return dynamic_cast<OutputPointSetType*>
(this->itk::ProcessObject::GetOutput(0));
(this->ProcessObjectType::GetOutput(0));
}
......
......@@ -99,7 +99,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValue = abs( C21 * C12 ) ;
FlusserValue = std::abs( C21 * C12 ) ;
}
break;
case 3:
......@@ -111,7 +111,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C20 * pow(C12,2);
FlusserValueComplex = C20 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -124,7 +124,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C20 * pow(C12,2);
FlusserValueComplex = C20 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.imag();
}
break;
......@@ -138,7 +138,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C30 * pow(C12,3) ;
FlusserValueComplex = C30 * std::pow(C12,3) ;
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -152,7 +152,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C30 * pow(C12,3) ;
FlusserValueComplex = C30 * std::pow(C12,3) ;
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -174,7 +174,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C31 * pow(C12,2);
FlusserValueComplex = C31 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -187,7 +187,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C31 * pow(C12,2);
FlusserValueComplex = C31 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.imag();
}
break;
......@@ -200,7 +200,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C40 * pow(C12,4);
FlusserValueComplex = C40 * std::pow(C12,4);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -213,7 +213,7 @@ FlusserImageFunction<TInput,TOutput,TCoordRep>
function->SetP(1);
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
FlusserValueComplex = C40 * pow(C12,4);
FlusserValueComplex = C40 * std::pow(C12,4);
FlusserValue = FlusserValueComplex.imag();
}
break;
......
......@@ -86,7 +86,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValue = abs( C21 * C12 ) ;
FlusserValue = std::abs( C21 * C12 ) ;
}
break;
case 3:
......@@ -98,7 +98,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C20 * pow(C12,2);
FlusserValueComplex = C20 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -111,7 +111,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C20 * pow(C12,2);
FlusserValueComplex = C20 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.imag();
}
break;
......@@ -125,7 +125,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C30 * pow(C12,3) ;
FlusserValueComplex = C30 * std::pow(C12,3) ;
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -139,7 +139,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C30 * pow(C12,3) ;
FlusserValueComplex = C30 * std::pow(C12,3) ;
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -161,7 +161,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C31 * pow(C12,2);
FlusserValueComplex = C31 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -174,7 +174,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C31 * pow(C12,2);
FlusserValueComplex = C31 * std::pow(C12,2);
FlusserValue = FlusserValueComplex.imag();
}
break;
......@@ -187,7 +187,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C40 * pow(C12,4);
FlusserValueComplex = C40 * std::pow(C12,4);
FlusserValue = FlusserValueComplex.real();
}
break;
......@@ -200,7 +200,7 @@ FlusserPathFunction<TInputPath, TOutput >
function->SetP(1);
function->SetQ(2);
C12 = function->Evaluate( );
FlusserValueComplex = C40 * pow(C12,4);
FlusserValueComplex = C40 * std::pow(C12,4);
FlusserValue = FlusserValueComplex.imag();
}
break;
......
......@@ -55,7 +55,7 @@ typename HuImageFunction<TInput,TOutput,TCoordRep>::RealType
HuImageFunction<TInput,TOutput,TCoordRep>
::EvaluateAtIndex(const IndexType& index) const
{
typename InputType::SizeType ImageSize;
//typename InputType::SizeType ImageSize;
RealType HuValue;
ComplexType HuValueComplex;
......@@ -101,7 +101,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C02 = function->EvaluateAtIndex( index );
HuValue = abs( C20 * C02 ) ;
HuValue = std::abs( C20 * C02 ) ;
}
break;
......@@ -115,7 +115,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(3);
C03 = function->EvaluateAtIndex( index );
HuValue = abs( C30 * C03 );
HuValue = std::abs( C30 * C03 );
}
break;
case 4:
......@@ -128,7 +128,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
HuValue = abs( C21 * C12 );
HuValue = std::abs( C21 * C12 );
}
break;
......@@ -142,7 +142,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
HuValueComplex = C30 * pow(C12,3) ;
HuValueComplex = C30 * std::pow(C12,3) ;
HuValue = HuValueComplex.real();
}
break;
......@@ -157,7 +157,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
HuValueComplex = C20 * pow( C12 ,2 );
HuValueComplex = C20 * std::pow( C12 ,2 );
HuValue = HuValueComplex.real();
}
break;
......@@ -172,7 +172,7 @@ HuImageFunction<TInput,TOutput,TCoordRep>
function->SetQ(2);
C12 = function->EvaluateAtIndex( index );
HuValueComplex = C30 * pow( C12 , 3);
HuValueComplex = C30 * std::pow( C12 , 3);
HuValue = HuValueComplex.imag();
}
break;
......
......@@ -87,7 +87,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(2);
C02 = function->Evaluate( );
HuValue = abs( C20 * C02 ) ;
HuValue = std::abs( C20 * C02 ) ;
}
break;
......@@ -101,7 +101,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(3);
C03 = function->Evaluate( );
HuValue = abs( C30 * C03 );
HuValue = std::abs( C30 * C03 );
}
break;
case 4:
......@@ -114,7 +114,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
HuValue = abs( C21 * C12 );
HuValue = std::abs( C21 * C12 );
}
break;
......@@ -128,7 +128,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
HuValueComplex = C30 * pow(C12,3) ;
HuValueComplex = C30 * std::pow(C12,3) ;
HuValue = HuValueComplex.real();
}
break;
......@@ -143,7 +143,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
HuValueComplex = C20 * pow( C12 ,2 );
HuValueComplex = C20 * std::pow( C12 ,2 );
HuValue = HuValueComplex.real();
}
break;
......@@ -158,7 +158,7 @@ HuPathFunction<TInputPath, TOutput >
function->SetQ(2);
C12 = function->Evaluate( );
HuValueComplex = C30 * pow( C12 , 3);
HuValueComplex = C30 * std::pow( C12 , 3);
HuValue = HuValueComplex.imag();
}
break;
......
......@@ -59,8 +59,8 @@ void LineDetectorImageFilterBase<TInputImage, TOutputImage, InterpolatorType>::G
Superclass::GenerateInputRequestedRegion();
// get pointers to the input and output
typename InputImageType::Pointer inputPtr = const_cast< TInputImage * >( this->GetInput() );
typename OutputImageType::Pointer outputPtr = this->GetOutput();
typename Superclass::InputImagePointer inputPtr = const_cast< TInputImage * >( this->GetInput() );
typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
if ( !inputPtr || !outputPtr )
{
......@@ -194,7 +194,9 @@ void LineDetectorImageFilterBase< TInputImage, TOutputImage, InterpolatorType>
// Number of zone
const int NB_ZONE = 3;
// Definition of the 4 directions
double Theta[NB_DIR];
//double Theta[NB_DIR];
//ROMAIN
double* Theta = new double[NB_DIR];
// La rotation nulle correspond a un contour horizontal -> 0 !!
for(int i=0; i<NB_DIR; i++)
......@@ -266,7 +268,11 @@ void LineDetectorImageFilterBase< TInputImage, TOutputImage, InterpolatorType>
// Contains for the 4 directions the the pixels belonging to each zone
std::vector<double> PixelValues[NB_DIR][NB_ZONE];
//std::vector<double> PixelValues[NB_DIR][NB_ZONE];
// ROMAIN
std::vector<double>** PixelValues=new std::vector<double>*[NB_DIR];
for (int i=0; i<NB_DIR; i++)
PixelValues[i] = new std::vector<double>[NB_ZONE];
// Loop on the region
//for (i = 0; i < neighborhoodSize; ++i)
......@@ -356,11 +362,16 @@ void LineDetectorImageFilterBase< TInputImage, TOutputImage, InterpolatorType>
++bit;
++it;
++itdir;
progress.CompletedPixel();
}
progress.CompletedPixel();
// ROMAIN
for (int i=0; i<NB_DIR; i++)
delete[] PixelValues[i];
delete[] PixelValues;
}
}
delete[] Theta;
}
template <class TInputImage, class TOutput, class InterpolatorType>
......
......@@ -21,8 +21,8 @@
#include "otbImageViewerAS.h"
#include <iostream>
#define MAX(_A,_B) ((_A) > (_B) ? (_A) : (_B))
#define MIN(_A,_B) ((_A) < (_B) ? (_A) : (_B))
//#define MAX(_A,_B) ((_A) > (_B) ? (_A) : (_B))
//#define MIN(_A,_B) ((_A) < (_B) ? (_A) : (_B))
......@@ -478,7 +478,8 @@ ImageViewerAS<TPixel>::LoadLeftImage()
return ;
}
typedef otb::ImageViewerAS<unsigned char> ViewerType;
typedef otb::ImageViewerAS<unsigned char> ViewerType;
typedef ViewerType::ImageType ImageType;
typedef otb::ImageFileReader< ImageType > VolumeReaderType;
......@@ -501,7 +502,7 @@ ImageViewerAS<TPixel>::LoadRightImage()
return ;
}
typedef otb::ImageViewerAS<unsigned char> ViewerType;
typedef otb::ImageViewerAS<unsigned char> ViewerType;
typedef ViewerType::ImageType ImageType;
typedef otb::ImageFileReader< ImageType > VolumeReaderType;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment