Skip to content
Snippets Groups Projects
Commit ebf0f8c4 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

STYLE: formatting the code for Software guide

parent bcc55ec3
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ int main( int argc, char * argv[] )
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef float InternalPixelType;
typedef float InternalPixelType;
typedef unsigned char OutputPixelType;
// Software Guide : EndCodeSnippet
......@@ -82,7 +82,7 @@ int main( int argc, char * argv[] )
// Software Guide : BeginCodeSnippet
typedef otb::Image< InternalPixelType, 2 > InternalImageType;
typedef otb::Image< OutputPixelType, 2 > OutputImageType;
typedef otb::Image< OutputPixelType, 2 > OutputImageType;
// Software Guide : EndCodeSnippet
......@@ -93,7 +93,8 @@ int main( int argc, char * argv[] )
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::LineRatioDetectorImageFilter< InternalImageType, InternalImageType > FilterType;
typedef otb::LineRatioDetectorImageFilter
< InternalImageType, InternalImageType > FilterType;
// Software Guide : EndCodeSnippet
......@@ -259,7 +260,5 @@ int main( int argc, char * argv[] )
// Software Guide : EndLatex
return EXIT_SUCCESS;
}
......@@ -54,7 +54,6 @@
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[] )
{
......@@ -86,14 +85,14 @@ int main(int argc, char* argv[] )
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef itk::Statistics::EuclideanDistance<PixelType> DistanceType;
typedef otb::SOMMap<PixelType,DistanceType,Dimension> SOMMapType;
typedef otb::ImageFileReader<SOMMapType> SOMReaderType;
typedef itk::Statistics::EuclideanDistance<PixelType> DistanceType;
typedef otb::SOMMap<PixelType, DistanceType, Dimension> SOMMapType;
typedef otb::ImageFileReader<SOMMapType> SOMReaderType;
// Software Guide : EndCodeSnippet
typedef otb::VectorImage<InputPixelType,Dimension> InputImageType;
typedef otb::ImageFileReader< InputImageType > ReaderType;
typedef otb::VectorImage<InputPixelType, Dimension> InputImageType;
typedef otb::ImageFileReader< InputImageType > ReaderType;
// Software Guide : BeginLatex
//
......@@ -127,7 +126,7 @@ int main(int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
typedef otb::Image<LabelPixelType, Dimension > OutputImageType;
typedef otb::Image<LabelPixelType, Dimension> OutputImageType;
typedef otb::ImageFileWriter<OutputImageType> WriterType;
// Software Guide : EndCodeSnippet
......@@ -161,7 +160,8 @@ int main(int argc, char* argv[] )
SampleType::Pointer sample = SampleType::New();
itk::ImageRegionIterator<InputImageType> it(reader->GetOutput(),reader->GetOutput()->GetLargestPossibleRegion());
itk::ImageRegionIterator<InputImageType> it(reader->GetOutput(),
reader->GetOutput()->GetLargestPossibleRegion());
it.GoToBegin();
......@@ -301,10 +301,3 @@ int main(int argc, char* argv[] )
return EXIT_SUCCESS;
}
......@@ -69,7 +69,8 @@ int main(int argc, char * argv[])
{
if(argc != 11)
{
std::cerr<<"Usage: "<<argv[0]<<" reffname outfname outprettyfname attribute_name lowerThan tresh spatialRadius rangeRadius minregionsize scale"<<std::endl;
std::cerr << "Usage: " << argv[0] << " reffname outfname outprettyfname attribute_name ";
std::cerr << "lowerThan tresh spatialRadius rangeRadius minregionsize scale" << std::endl;
return EXIT_FAILURE;
}
......@@ -145,7 +146,7 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
filter->SetInput(reader->GetOutput());
filter->SetInput(reader->GetOutput());
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......@@ -178,7 +179,8 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
RadiometricLabelMapFilterType::Pointer radiometricLabelMapFilter = RadiometricLabelMapFilterType::New();
RadiometricLabelMapFilterType::Pointer radiometricLabelMapFilter
= RadiometricLabelMapFilterType::New();
radiometricLabelMapFilter->SetInput1(statisticsLabelMapFilter->GetOutput());
radiometricLabelMapFilter->SetInput2(vreader->GetOutput());
// Software Guide : EndCodeSnippet
......@@ -224,7 +226,8 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
LabelMapToLabeledImageFilterType::Pointer labelMap2LabeledImage = LabelMapToLabeledImageFilterType::New();
LabelMapToLabeledImageFilterType::Pointer labelMap2LabeledImage
= LabelMapToLabeledImageFilterType::New();
labelMap2LabeledImage->SetInput(opening->GetOutput());
// Software Guide : EndCodeSnippet
......
......@@ -77,7 +77,6 @@ int main( int argc, char* argv[] )
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// The output of this program will be saved in a text file. We also want
......@@ -159,15 +158,15 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
std::string projectionRefWkt ="PROJCS[\"UTM Zone 31, Northern Hemisphere\","
"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,"
"AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],"
"AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"
"UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],"
"AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],"
"AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],"
"PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],"
"PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],"
"PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]";
"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,"
"AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],"
"AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"
"UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],"
"AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],"
"AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],"
"PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],"
"PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],"
"PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]";
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......
......@@ -115,7 +115,8 @@ int main( int argc, char* argv[] )
region.SetOrigin(index);
otb::ImageMetadataInterfaceBase::Pointer imageMetadataInterface
= otb::ImageMetadataInterfaceFactory::CreateIMI(imageReader->GetOutput()->GetMetaDataDictionary());
= otb::ImageMetadataInterfaceFactory::CreateIMI(
imageReader->GetOutput()->GetMetaDataDictionary());
region.SetRegionProjection(
imageMetadataInterface->GetProjectionRef(
imageReader->GetOutput()->GetMetaDataDictionary()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment