Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ImageINSA_Tanguy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tanguy.Raufflet
ImageINSA_Tanguy
Commits
991577ad
Commit
991577ad
authored
1 year ago
by
Tanguy Raufflet
Browse files
Options
Downloads
Patches
Plain Diff
Retrait de l'échelle log sur la transf. de Fourier + corection des warnings sur FFTOp.cpp/.h
parent
9a866746
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Operations/FFTOp.cpp
+10
-10
10 additions, 10 deletions
app/Operations/FFTOp.cpp
app/Operations/FFTOp.h
+2
-2
2 additions, 2 deletions
app/Operations/FFTOp.h
with
12 additions
and
12 deletions
app/Operations/FFTOp.cpp
+
10
−
10
View file @
991577ad
...
...
@@ -34,22 +34,22 @@ bool FFTOp::needCurrentImg() const {
}
void
FFTOp
::
operator
()(
const
imagein
::
Image
*
image
,
const
map
<
const
imagein
::
Image
*
,
string
>&
)
{
FFTDialog
*
dialog
=
new
FFTDialog
(
QApplication
::
activeWindow
());
QDialog
::
DialogCode
code
=
static_cast
<
QDialog
::
DialogCode
>
(
dialog
->
exec
());
auto
*
dialog
=
new
FFTDialog
(
QApplication
::
activeWindow
());
auto
code
=
static_cast
<
QDialog
::
DialogCode
>
(
dialog
->
exec
());
if
(
code
!=
QDialog
::
Accepted
)
return
;
unsigned
int
width
=
nearestUpPower2
(
image
->
getWidth
());
unsigned
int
height
=
nearestUpPower2
(
image
->
getHeight
());
int
width
=
nearestUpPower2
(
(
int
)
image
->
getWidth
());
int
height
=
nearestUpPower2
(
(
int
)
image
->
getHeight
());
complex
<
double
>
**
data
=
new
complex
<
double
>*
[
width
];
auto
**
data
=
new
complex
<
double
>*
[
width
];
for
(
unsigned
int
i
=
0
;
i
<
width
;
++
i
)
data
[
i
]
=
new
complex
<
double
>
[
height
];
if
(
dialog
->
isMagPhase
())
{
Image_t
<
double
>
*
magnitudeImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
Image_t
<
double
>
*
phaseImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
auto
*
magnitudeImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
auto
*
phaseImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
for
(
unsigned
int
c
=
0
;
c
<
image
->
getNbChannels
();
++
c
)
{
for
(
unsigned
int
j
=
0
;
j
<
image
->
getHeight
();
++
j
)
{
for
(
unsigned
int
i
=
0
;
i
<
image
->
getWidth
();
++
i
)
{
...
...
@@ -94,12 +94,12 @@ void FFTOp::operator()(const imagein::Image* image, const map<const imagein::Ima
}
}
/*(imagein::ImageDouble* img, std::string title = "", bool norm=false, bool log=false, double logScale = 1., bool abs = false)*/
this
->
outDoubleImage
(
phaseImg
,
qApp
->
translate
(
"FFTOp"
,
"DFT (Phase)"
).
toStdString
(),
false
,
tru
e
);
this
->
outDoubleImage
(
phaseImg
,
qApp
->
translate
(
"FFTOp"
,
"DFT (Phase)"
).
toStdString
(),
false
,
fals
e
);
this
->
outDoubleImage
(
magnitudeImg
,
qApp
->
translate
(
"FFTOp"
,
"DFT (Magnitude)"
).
toStdString
(),
false
,
true
);
}
else
{
Image_t
<
double
>
*
realImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
Image_t
<
double
>
*
imagImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
auto
*
realImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
auto
*
imagImg
=
new
Image_t
<
double
>
(
width
,
height
,
image
->
getNbChannels
());
for
(
unsigned
int
c
=
0
;
c
<
image
->
getNbChannels
();
++
c
)
{
for
(
unsigned
int
j
=
0
;
j
<
image
->
getHeight
();
++
j
)
{
for
(
unsigned
int
i
=
0
;
i
<
image
->
getWidth
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
app/Operations/FFTOp.h
+
2
−
2
View file @
991577ad
...
...
@@ -27,9 +27,9 @@ class FFTOp : public Operation
public:
FFTOp
();
void
operator
()(
const
imagein
::
Image
*
,
const
std
::
map
<
const
imagein
::
Image
*
,
std
::
string
>&
);
void
operator
()
(
const
imagein
::
Image
*
,
const
std
::
map
<
const
imagein
::
Image
*
,
std
::
string
>&
)
override
;
bool
needCurrentImg
()
const
;
bool
needCurrentImg
()
const
override
;
};
#endif // FFTOP_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment