Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ISBI2016-filaSimu-TM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Vladimír Ulman
ISBI2016-filaSimu-TM
Commits
a7a2ddba
There was an error fetching the commit references. Please try again later.
Commit
a7a2ddba
authored
8 years ago
by
Vladimír Ulman
Browse files
Options
Downloads
Patches
Plain Diff
Cell automatic position removed (BUG), cell made a bit fatter in Z-axis.
parent
72ab1688
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.cpp
+10
-13
10 additions, 13 deletions
src/main.cpp
with
10 additions
and
13 deletions
src/main.cpp
+
10
−
13
View file @
a7a2ddba
...
...
@@ -27,8 +27,6 @@ int main(void)
for
(
int
i
=
10
;
i
<
11
;
++
i
)
{
LoadNewMesh
(
i
);
mesh
.
ScaleMesh
(
Vector3F
(
1.6
f
,
1.6
f
,
1.3
f
));
mesh
.
TranslateMesh
(
Vector3F
(
-
8.0
f
,
-
8.0
f
,
-
4.
f
));
std
::
cout
<<
"mesh: #"
<<
i
<<
"
\n
"
;
std
::
cout
<<
"vertices #: "
<<
mesh
.
Pos
.
size
()
<<
"
\n
"
;
...
...
@@ -36,8 +34,8 @@ int main(void)
std
::
cout
<<
"normals #: "
<<
mesh
.
norm
.
size
()
<<
"
\n
"
;
RenderMesh
(
i
);
RenderMesh
(
i
+
1
);
RenderMesh
(
i
+
2
);
//
RenderMesh(i+1);
//
RenderMesh(i+2);
}
/*
...
...
@@ -132,9 +130,13 @@ int LoadNewMesh(int fileNo)
return
(
2
);
}
mesh
.
CenterMesh
(
params
.
sceneCentre
);
std
::
cout
<<
"loaded mesh #"
<<
fileNo
<<
"
\n
"
;
//position the mesh somewhat inside the scene
mesh
.
ScaleMesh
(
Vector3F
(
1.6
f
,
1.6
f
,
2.0
f
));
//mesh.TranslateMesh(Vector3F(-8.0f,-8.0f,-4.f));
mesh
.
TranslateMesh
(
params
.
sceneCentre
);
return
(
0
);
}
...
...
@@ -154,6 +156,8 @@ int RenderMesh(int fileNo)
//renders and resamples the texture
i3d
::
Image3d
<
i3d
::
GRAY16
>
texture
;
mesh
.
RenderOneTimeTexture
(
mask
,
texture
);
/*
if (mesh.DotsFirstRun())
{
std::cout << "rendering texture first run\n";
...
...
@@ -166,6 +170,7 @@ int RenderMesh(int fileNo)
}
std::cout << "rendering texture #" << fileNo << "\n";
mesh.RenderDots(mask,texture);
*/
std
::
cout
<<
"exporting texture #"
<<
fileNo
<<
"
\n
"
;
char
fileName
[
1024
];
...
...
@@ -174,14 +179,6 @@ int RenderMesh(int fileNo)
//resample also the mask before exporting
std
::
cout
<<
"exporting mask #"
<<
fileNo
<<
"
\n
"
;
/*
float factor[3]={1.f,1.f,0.125f};
i3d::Image3d<i3d::GRAY16>* tmp=NULL;
i3d::lanczos_resample(&mask,tmp,factor,2);
sprintf(fileName,"mask_t%03d.tif",fileNo);
tmp->SaveImage(fileName);
delete tmp;
*/
i3d
::
Resample
(
mask
,
texture
,
mask
.
GetSizeX
(),
mask
.
GetSizeY
(),
mask
.
GetSizeZ
()
/
8
);
sprintf
(
fileName
,
"mask_t%03d.tif"
,
fileNo
);
...
...
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