Skip to content
Snippets Groups Projects
Commit 58d18060 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: set the sizefactor optionnal

parent 69c54341
Branches
Tags
No related merge requests found
...@@ -48,8 +48,8 @@ ${TEMP}/vrTvImageWidgetImageDumpWithoutGlAcceleration.png ...@@ -48,8 +48,8 @@ ${TEMP}/vrTvImageWidgetImageDumpWithoutGlAcceleration.png
otbImageWidgetImageDump otbImageWidgetImageDump
${INPUTDATA}/qb_RoadExtract2sub200x200.tif # input image ${INPUTDATA}/qb_RoadExtract2sub200x200.tif # input image
0 # use glAcceleration 0 # use glAcceleration
2 # resize factor
${TEMP}/vrTvImageWidgetImageDumpWithoutGlAcceleration.png ${TEMP}/vrTvImageWidgetImageDumpWithoutGlAcceleration.png
2 # resize factor
) )
IF(OTB_GL_USE_ACCEL) IF(OTB_GL_USE_ACCEL)
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
int otbImageWidgetImageDump(int argc, char * argv[]) int otbImageWidgetImageDump(int argc, char * argv[])
{ {
const char * infname = argv[1]; const char * infname = argv[1];
const bool useAccel = atoi(argv[2]); const bool useAccel = atoi(argv[2]);
unsigned int sizeFactor = atoi(argv[3]); const char * filename = argv[3];
const char * filename = argv[4];
// typedefs // typedefs
...@@ -43,8 +42,11 @@ int otbImageWidgetImageDump(int argc, char * argv[]) ...@@ -43,8 +42,11 @@ int otbImageWidgetImageDump(int argc, char * argv[])
ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion();
ImageType::RegionType::SizeType size = region.GetSize(); ImageType::RegionType::SizeType size = region.GetSize();
size[0] /= sizeFactor; if( argc == 5 )
size[1] /= sizeFactor; {
size[0] /= atoi(argv[4]);
size[1] /= atoi(argv[4]);
}
region.SetSize(size); region.SetSize(size);
// Create a widget // Create a widget
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment