Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blob Analysis Lab Ecole
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin BARDIAUX
Blob Analysis Lab Ecole
Commits
9f2ad553
Commit
9f2ad553
authored
Sep 24, 2022
by
Laurent Knoll
Browse files
Options
Downloads
Patches
Plain Diff
Export de la boite de petri par points et non par segments incurvés. Closes #5
parent
c7df6505
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data/dataExporter.ts
+15
-1
15 additions, 1 deletion
src/data/dataExporter.ts
src/steps/downloadStep.tsx
+2
-2
2 additions, 2 deletions
src/steps/downloadStep.tsx
with
17 additions
and
3 deletions
src/data/dataExporter.ts
+
15
−
1
View file @
9f2ad553
...
...
@@ -15,7 +15,21 @@ export class DataExporter {
/**
* Transforme un Path en CSV
*/
public
exportPathAsXYCsv
(
coords
:
Coords
,
close
:
boolean
)
:
string
{
public
exportPathPointsAsXYCsv
(
coords
:
Coords
,
close
:
boolean
)
:
string
{
const
path
=
coords
.
toRemovedPath
();
let
data
=
""
;
for
(
let
i
=
0
;
i
<
path
.
length
;
i
++
)
{
let
point
=
path
.
getPointAt
(
i
);
data
+=
Math
.
round
(
point
.
x
)
+
"
\t
"
+
Math
.
round
(
point
.
y
)
+
"
\n
"
;
}
return
data
;
}
/**
* Transforme un Path en CSV par segments
*/
public
exportPathSegmentsAsXYCsv
(
coords
:
Coords
,
close
:
boolean
)
:
string
{
const
path
=
coords
.
toRemovedPath
();
let
data
=
""
;
for
(
let
i
=
0
;
i
<
path
.
segments
.
length
;
i
++
)
{
...
...
...
...
This diff is collapsed.
Click to expand it.
src/steps/downloadStep.tsx
+
2
−
2
View file @
9f2ad553
...
...
@@ -75,7 +75,7 @@ export class DownloadStep extends Step<DownloadStepState> {
* Téléchargement des données de la boîte de Petri
*/
private
downloadPetriDishData
()
:
void
{
let
data
=
this
.
dataExporter
.
exportPathAsXYCsv
(
this
.
props
.
lab
.
data
.
petriDishCoords
,
true
);
let
data
=
this
.
dataExporter
.
exportPath
Points
AsXYCsv
(
this
.
props
.
lab
.
data
.
petriDishCoords
,
true
);
IoUtils
.
downloadData
(
this
.
state
.
petriDishDataFilename
,
"
text/plain;charset=UTF-8
"
,
data
);
}
...
...
@@ -83,7 +83,7 @@ export class DownloadStep extends Step<DownloadStepState> {
* Téléchargement des données du mask
*/
private
downloadBlobMaskData
()
:
void
{
let
data
=
this
.
dataExporter
.
exportPathAsXYCsv
(
this
.
props
.
lab
.
data
.
blobMaskCoords
,
true
);
let
data
=
this
.
dataExporter
.
exportPath
Segments
AsXYCsv
(
this
.
props
.
lab
.
data
.
blobMaskCoords
,
true
);
IoUtils
.
downloadData
(
this
.
state
.
blobMaskDataFilename
,
"
text/plain;charset=UTF-8
"
,
data
);
}
...
...
...
...
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
sign in
to comment