Commit 7e45293c authored by Otmane Lahlou's avatar Otmane Lahlou

STYLE

parent a8207aa6
......@@ -74,47 +74,48 @@ public:
itkTypeMacro(KmzProductWriter, itk::ProcessObject);
/** Some convenient typedefs. */
typedef TInputImage InputImageType;
typedef TInputImage InputImageType;
typedef typename InputImageType::InternalPixelType InternalPixelType;
typedef typename InputImageType::SizeType SizeType;
typedef typename InputImageType::IndexType IndexType;
typedef typename InputImageType::RegionType RegionType;
typedef unsigned char OutputPixelType;
typedef typename InputImageType::Pointer InputImagePointer;
typedef typename InputImageType::PixelType InputImagePixelType;
typedef VectorData<double, 2> VectorDataType;
typedef typename VectorDataType::DataNodeType DataNodeType;
typedef typename DataNodeType::PolygonType PolygonType;
typedef typename PolygonType::VertexType VertexType;
typedef typename InputImageType::SizeType SizeType;
typedef typename InputImageType::IndexType IndexType;
typedef typename InputImageType::RegionType RegionType;
typedef unsigned char OutputPixelType;
typedef typename InputImageType::Pointer InputImagePointer;
typedef typename InputImageType::PixelType InputImagePixelType;
typedef VectorData<double, 2> VectorDataType;
typedef typename VectorDataType::DataNodeType DataNodeType;
typedef typename DataNodeType::PolygonType PolygonType;
typedef typename PolygonType::VertexType VertexType;
typedef VectorDataFileWriter<VectorDataType> VectorDataFileWriterType;
typedef VectorDataFileWriter<VectorDataType> VectorDataFileWriterType;
/// Multi channels Extract ROI filter
typedef MultiChannelExtractROI<InternalPixelType, OutputPixelType> VectorImageExtractROIFilterType;
// Multi channels Extract ROI filter
typedef MultiChannelExtractROI<InternalPixelType, OutputPixelType> VectorImageExtractROIFilterType;
// Writer
typedef ImageFileWriter< VectorImage<OutputPixelType> > VectorWriterType;
typedef ImageFileWriter< VectorImage<OutputPixelType> > VectorWriterType;
// Resampler
typedef StreamingShrinkImageFilter<InputImageType, InputImageType > StreamingShrinkImageFilterType;
// Intensity Rescale
typedef VectorRescaleIntensityImageFilter<InputImageType,
InputImageType> VectorRescaleIntensityImageFilterType;
InputImageType> VectorRescaleIntensityImageFilterType;
// Transformer
typedef GenericRSTransform<> TransformType;
typedef TransformType::InputPointType InputPointType;
typedef TransformType::OutputPointType OutputPointType;
typedef GenericRSTransform<> TransformType;
typedef TransformType::InputPointType InputPointType;
typedef TransformType::OutputPointType OutputPointType;
// Cast Image Filter
typedef itk::CastImageFilter<InputImageType, VectorImage<OutputPixelType> > CastFilterType;
typedef itk::CastImageFilter<InputImageType,
VectorImage<OutputPixelType> > CastFilterType;
// std::pair description <-> legend (image)
typedef std::pair<std::string, InputImagePointer> LegendPairType;
typedef std::vector<LegendPairType> LegendVectorType;
typedef std::pair<std::string, InputImagePointer> LegendPairType;
typedef std::vector<LegendPairType> LegendVectorType;
/** Dimension of input image. */
itkStaticConstMacro(InputImageDimension, unsigned int,
......
......@@ -932,7 +932,9 @@ KmzProductWriter<TInputImage>
template <class TInputImage>
void
KmzProductWriter<TInputImage>
::GenerateKML(const std::string& pathname, int depth, int x, int y, double north, double south, double east, double west)
::GenerateKML(const std::string& pathname, int depth,
int x, int y, double north, double south,
double east, double west)
{
std::ostringstream kmlname;
kmlname << pathname;
......
......@@ -56,7 +56,9 @@ int main(int argc, char* argv[])
if (argc < 6)
{
std::cerr << "Usage: " << argv[0] << " infname outfname kmzFileName a1x a1y b1x b1y b1z ... aNx aNy aNz bNx bNy bNz" << std::endl;
std::cerr << "Usage: " << argv[0]
<< " infname outfname kmzFileName "
<<"a1x a1y b1x b1y b1z ... aNx aNy aNz bNx bNy bNz" << std::endl;
return EXIT_FAILURE;
}
else if ((argc - 7) % 5 != 0)
......
......@@ -128,7 +128,7 @@ int otbGCPsToRPCSensorModelImageFilterCheckRpcModel(int argc, char* argv[])
for (unsigned int gcpId = 0; gcpId < nbGCPs; ++gcpId)
{
ImageType::IndexType index;
ImageType::IndexType index;
index[0] = parseResult->GetParameterFloat("--GroudControlPoints", gcpId * 5);
index[1] = parseResult->GetParameterFloat("--GroudControlPoints", 1 + gcpId * 5);
......@@ -136,7 +136,6 @@ int otbGCPsToRPCSensorModelImageFilterCheckRpcModel(int argc, char* argv[])
reader->GetOutput()->TransformIndexToPhysicalPoint(index, point);
transformedPoint = grsTrasnform->TransformPoint(point);
// reference point
ImageType::PointType geoPoint;
geoPoint[0] = parseResult->GetParameterFloat("--GroudControlPoints", 2 + gcpId * 5);
......@@ -158,9 +157,11 @@ int otbGCPsToRPCSensorModelImageFilterCheckRpcModel(int argc, char* argv[])
if( residual > parseResult->GetParameterFloat("--ErrorAllowed"))
{
std::cout << "Reference : "<< geoPoint
<<" --> Result of the reprojection using the estimated RpcModel "<< grsTrasnform->TransformPoint(point)
<<" --> Result of the reprojection using the estimated RpcModel "
<< grsTrasnform->TransformPoint(point)
<< std::endl
<< " Residual ["<< residual << "] is higher than the tolerance ["<< parseResult->GetParameterFloat("--ErrorAllowed")
<< " Residual ["<< residual << "] is higher than the tolerance ["
<< parseResult->GetParameterFloat("--ErrorAllowed")
<<"], there is a problem with the estimated RpcModel"
<<std::endl<<std::endl;
isErrorDetected = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment