Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
38c9cc53
Commit
38c9cc53
authored
Jul 18, 2013
by
Stéphane Albert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: Fixed issue
http://bugs.orfeo-toolbox.org/view.php?id=731
.
parent
3d68e789
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
17 deletions
+49
-17
Code/Application/Monteverdi2/mvdMainWindow.cxx
Code/Application/Monteverdi2/mvdMainWindow.cxx
+5
-4
Code/Application/Monteverdi2/mvdMainWindow.h
Code/Application/Monteverdi2/mvdMainWindow.h
+1
-1
Code/Application/Viewer/mvdImageLoader.cxx
Code/Application/Viewer/mvdImageLoader.cxx
+2
-1
Code/Common/Core/mvdDatasetModel.cxx
Code/Common/Core/mvdDatasetModel.cxx
+1
-1
Code/Common/Core/mvdDatasetModel.h
Code/Common/Core/mvdDatasetModel.h
+21
-5
Code/Common/Core/mvdI18nCoreApplication.cxx
Code/Common/Core/mvdI18nCoreApplication.cxx
+3
-2
Code/Common/Core/mvdI18nCoreApplication.h
Code/Common/Core/mvdI18nCoreApplication.h
+4
-1
Code/Common/Core/mvdImageImporter.cxx
Code/Common/Core/mvdImageImporter.cxx
+7
-2
Code/Common/Core/mvdImageImporter.h
Code/Common/Core/mvdImageImporter.h
+5
-0
No files found.
Code/Application/Monteverdi2/mvdMainWindow.cxx
View file @
38c9cc53
...
...
@@ -823,7 +823,7 @@ MainWindow
/*****************************************************************************/
void
MainWindow
::
ImportImage
(
const
QString
&
filename
)
::
ImportImage
(
const
QString
&
filename
,
bool
forceCreate
)
{
//
// Background task.
...
...
@@ -833,6 +833,7 @@ MainWindow
ImageImporter
*
importer
=
new
ImageImporter
(
filename
,
forceCreate
,
m_ImageView
->
width
(),
m_ImageView
->
height
()
);
...
...
@@ -921,7 +922,7 @@ MainWindow
//
// Import the image
ImportImage
(
filename
);
ImportImage
(
filename
,
false
);
}
/*****************************************************************************/
...
...
@@ -1482,7 +1483,7 @@ MainWindow
// catalog database.
// import the result image into the database
ImportImage
(
outfname
);
ImportImage
(
outfname
,
true
);
}
/*****************************************************************************/
...
...
@@ -1518,7 +1519,7 @@ void
MainWindow
::
OnImageToImportDropped
(
const
QString
&
fname
)
{
ImportImage
(
fname
);
ImportImage
(
fname
,
false
);
}
}
// end namespace 'mvd'
Code/Application/Monteverdi2/mvdMainWindow.h
View file @
38c9cc53
...
...
@@ -129,7 +129,7 @@ signals:
// Protected methods.
protected:
void
ImportImage
(
const
QString
&
filenam
e
);
void
ImportImage
(
const
QString
&
filename
,
bool
forceCreat
e
);
//
// QMainWindow overrides.
...
...
Code/Application/Viewer/mvdImageLoader.cxx
View file @
38c9cc53
...
...
@@ -67,7 +67,8 @@ ImageLoader
try
{
DatasetModel
*
model
=
Application
::
LoadDatasetModel
(
m_Filename
,
m_Width
,
m_Height
);
m_Filename
,
m_Width
,
m_Height
,
false
);
// We can only push to another thread,
// so thread affinity must be set here,
...
...
Code/Common/Core/mvdDatasetModel.cxx
View file @
38c9cc53
...
...
@@ -321,7 +321,7 @@ DatasetModel
m_Directory
=
workingDir
;
// Initialize content.
if
(
isEmpty
)
if
(
isEmpty
||
buildContext
->
m_IsForceCreateEnabled
)
{
// Create in-memory descriptor.
assert
(
m_Descriptor
==
NULL
);
...
...
Code/Common/Core/mvdDatasetModel.h
View file @
38c9cc53
...
...
@@ -103,13 +103,15 @@ public:
const
QString
&
name
,
const
QString
&
alias
,
int
width
,
int
height
)
:
int
height
,
bool
isForceCreateEnabled
=
false
)
:
m_Path
(
path
),
m_Name
(
name
),
m_Alias
(
alias
),
m_Width
(
width
),
m_Height
(
height
),
m_IsLoadSubModelsEnabled
(
true
)
m_IsLoadSubModelsEnabled
(
true
),
m_IsForceCreateEnabled
(
isForceCreateEnabled
)
{
}
...
...
@@ -121,7 +123,8 @@ public:
m_Alias
(),
m_Width
(
-
1
),
m_Height
(
-
1
),
m_IsLoadSubModelsEnabled
(
false
)
m_IsLoadSubModelsEnabled
(
false
),
m_IsForceCreateEnabled
(
false
)
{
}
...
...
@@ -132,7 +135,8 @@ public:
m_Alias
(),
m_Width
(
width
),
m_Height
(
height
),
m_IsLoadSubModelsEnabled
(
true
)
m_IsLoadSubModelsEnabled
(
true
),
m_IsForceCreateEnabled
(
false
)
{
}
...
...
@@ -144,7 +148,19 @@ public:
QString
m_Alias
;
int
m_Width
;
int
m_Height
;
bool
m_IsLoadSubModelsEnabled
;
bool
m_IsLoadSubModelsEnabled
:
1
;
bool
m_IsForceCreateEnabled
:
1
;
/*
union
{
struct
{
bool m_IsLoadSubModelsEnabled: 1;
bool m_IsForceCreateEnabled: 1;
};
unsigned char m_Flags;
};
*/
};
//
...
...
Code/Common/Core/mvdI18nCoreApplication.cxx
View file @
38c9cc53
...
...
@@ -161,7 +161,8 @@ DatasetModel*
I18nCoreApplication
::
LoadDatasetModel
(
const
QString
&
imageFilename
,
int
width
,
int
height
)
int
height
,
bool
forceCreate
)
{
// New model.
DatasetModel
*
model
=
new
DatasetModel
();
...
...
@@ -187,7 +188,7 @@ I18nCoreApplication
// Build model (relink to cached data).
DatasetModel
::
BuildContext
context
(
path
,
name
,
finfo
.
baseName
(),
width
,
height
path
,
name
,
finfo
.
baseName
(),
width
,
height
,
forceCreate
);
model
->
BuildModel
(
&
context
);
...
...
Code/Common/Core/mvdI18nCoreApplication.h
View file @
38c9cc53
...
...
@@ -272,13 +272,16 @@ public:
* \param imageFilename The input image filename.
* \param with The width (in pixels) of the screen best fit.
* \param height The height (in pixels) of the screen best fit.
* \param forceCreate true to force dataset creation even if there
* is already an existing non-empty dataset directory.
*
* \return The loaded DatasetModel instance or NULL if the method has failed.
*/
static
DatasetModel
*
LoadDatasetModel
(
const
QString
&
imageFilename
,
int
width
,
int
height
);
int
height
,
bool
forceCreate
);
/**
* \brief Get the cache directory.
...
...
Code/Common/Core/mvdImageImporter.cxx
View file @
38c9cc53
...
...
@@ -69,13 +69,15 @@ namespace
/*******************************************************************************/
ImageImporter
::
ImageImporter
(
const
QString
&
filename
,
bool
isForceCreateEnabled
,
int
width
,
int
height
,
QObject
*
parent
)
:
AbstractWorker
(
parent
),
m_Filename
(
filename
),
m_Width
(
width
),
m_Height
(
height
)
m_Height
(
height
),
m_IsForceCreateEnabled
(
isForceCreateEnabled
)
{
}
...
...
@@ -100,7 +102,10 @@ ImageImporter
emit
ProgressRangeChanged
(
0
,
0
);
// Load dataset-model.
return
I18nCoreApplication
::
LoadDatasetModel
(
m_Filename
,
m_Width
,
m_Height
);
return
I18nCoreApplication
::
LoadDatasetModel
(
m_Filename
,
m_Width
,
m_Height
,
m_IsForceCreateEnabled
);
}
/*******************************************************************************/
...
...
Code/Common/Core/mvdImageImporter.h
View file @
38c9cc53
...
...
@@ -89,8 +89,10 @@ public:
* \param filename Filename of image to import.
* \param width Width of the best-fit size or -1 if none.
* \param height Height of the best-fit size or -1 if none.
* \param isForceCreateEnabled true to force creation of dataset.
*/
ImageImporter
(
const
QString
&
filename
,
bool
isForceCreateEnabled
,
int
width
=-
1
,
int
height
=-
1
,
QObject
*
parent
=
NULL
);
...
...
@@ -160,6 +162,9 @@ private:
/**
*/
int
m_Height
;
/**
*/
bool
m_IsForceCreateEnabled
:
1
;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
...
...
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