Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cresson Remi
LSGRM
Commits
bca09fa5
Commit
bca09fa5
authored
Feb 20, 2017
by
remi cresson
Browse files
ENH: default temporary directory path is the same as output image, when -tmpdir parameter is empty
parent
dc93112c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/otbLSGRM.cxx
View file @
bca09fa5
...
...
@@ -97,6 +97,7 @@ private:
// For large scale
AddParameter
(
ParameterType_Directory
,
"tmpdir"
,
"Directory for temporary files"
);
MandatoryOff
(
"tmpdir"
);
AddParameter
(
ParameterType_Choice
,
"tiling"
,
"Tiling layout for the large scale segmentation"
);
AddChoice
(
"tiling.auto"
,
"Automatic tiling layout"
);
AddChoice
(
"tiling.user"
,
"User tiling layout"
);
...
...
@@ -124,7 +125,16 @@ private:
std
::
string
outbfname
=
itksys
::
SystemTools
::
GetFilenameWithoutExtension
(
outfname
.
c_str
());
// Get specified temporary directory
std
::
string
tmpdir
=
GetParameterAsString
(
"tmpdir"
);
std
::
string
tmpdir
;
if
(
HasValue
(
"tmpdir"
))
{
tmpdir
=
GetParameterAsString
(
"tmpdir"
);
}
else
{
tmpdir
=
itksys
::
SystemTools
::
GetFilenamePath
(
outfname
);
}
if
(
!
tmpdir
.
empty
())
{
// A temporary directory is specified: we check that it ends with a POSIX separator
...
...
@@ -140,6 +150,7 @@ private:
{
otbAppLogFATAL
(
"The directory "
<<
tmpdir
<<
" does not exist."
);
}
otbAppLogINFO
(
"Using temporary directory "
<<
tmpdir
);
// Return the prefix
std
::
string
prefix
=
tmpdir
+
outbfname
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment