Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Ruiliang Gao
iMSTK
Commits
04f23e41
Commit
04f23e41
authored
9 years ago
by
Sreekanth Arikatla
Committed by
Ricardo Ortiz
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Adds script to download resources from Midas3.
parent
c97118e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Examples/LaparoscopicCamera/CMakeLists.txt
+7
-15
7 additions, 15 deletions
Examples/LaparoscopicCamera/CMakeLists.txt
Examples/LaparoscopicCamera/main.cpp
+5
-5
5 additions, 5 deletions
Examples/LaparoscopicCamera/main.cpp
with
12 additions
and
20 deletions
Examples/LaparoscopicCamera/CMakeLists.txt
+
7
−
15
View file @
04f23e41
set
(
APP Lap
aroscopicCamera
)
set
(
APP Lap
CameraNavigationApp
)
add_executable
(
${
APP
}
main.cpp
)
target_link_libraries
(
${
APP
}
Core
Geometry
VTKRendering
# Rendering
# RenderDelegates
Simulators
Mesh
Collision
ContactHandling
Event
# ExamplesCommon
IO
Devices
VirtualTools
...
...
@@ -28,20 +23,17 @@ if(NOT EXISTS ${${APP}_DATA})
file
(
MAKE_DIRECTORY
${${
APP
}
_DATA
}
)
endif
()
set
(
FILE_URL http://midas3.kitware.com/midas/download/item/318708/box.tar
)
set
(
FILE_SHA1 928294a91477bc5d6fa494afb34016ba7f0b40c5
)
set
(
LOCAL_FILE
${
EXAMPLES_DATA
}
/box.tar
)
set
(
FILE_URL http://midas3.kitware.com/midas/download/item/318829/CameraNavAppData.tar
)
set
(
FILE_SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709
)
set
(
LOCAL_FILE
${
EXAMPLES_DATA
}
/CameraNavAppData.tar
)
midas_download
(
${
FILE_URL
}
${
FILE_SHA1
}
${
LOCAL_FILE
}
)
# Extract data
set
(
DATA
${${
APP
}
_DATA
}
/box.bou
${${
APP
}
_DATA
}
/box.config
${${
APP
}
_DATA
}
/box.interp
${${
APP
}
_DATA
}
/box.mass
${${
APP
}
_DATA
}
/box.vtk
${${
APP
}
_DATA
}
/box.veg
${${
APP
}
_DATA
}
/Target-marker.vtk
${${
APP
}
_DATA
}
/Target.vtk
)
add_custom_command
(
...
...
This diff is collapsed.
Click to expand it.
Examples/LaparoscopicCamera/main.cpp
+
5
−
5
View file @
04f23e41
...
...
@@ -55,13 +55,14 @@ bool createCameraNavigationScene(
auto
plane
=
std
::
make_shared
<
PlaneCollisionModel
>
(
core
::
Vec3d
(
0.0
,
-
0.01
,
0.0
),
core
::
Vec3d
(
0.0
,
1.0
,
0.0
));
plane
->
getPlaneModel
()
->
setWidth
(
5
);
staticObject
->
setModel
(
plane
);
auto
planeRendDetail
=
std
::
make_shared
<
RenderDetail
>
(
SIMMEDTK_RENDER_NORMALS
);
planeRendDetail
->
setAmbientColor
(
Color
(
0.
5
,
0.
5
,
0.
5
,
1.0
));
planeRendDetail
->
setDiffuseColor
(
Color
(
0.
5
,
0.
5
,
0.
5
,
1.0
));
planeRendDetail
->
setAmbientColor
(
Color
(
0.
4
,
0.
4
,
0.
4
,
1.0
));
planeRendDetail
->
setDiffuseColor
(
Color
(
0.
4
,
0.
4
,
0.
4
,
1.0
));
planeRendDetail
->
setSpecularColor
(
Color
(
0.4
,
0.4
,
0.4
,
1.0
));
planeRendDetail
->
setShininess
(
50.0
);
...
...
@@ -119,8 +120,8 @@ bool createCameraNavigationScene(
auto
targetModel
=
std
::
make_shared
<
MeshCollisionModel
>
();
targetModel
->
loadTriangleMesh
(
fileNameTarget
);
targetModel
->
getMesh
()
->
scal
e
(
Eigen
::
UniformScaling
<
double
>
(
0.1
));
//0.2
targetModel
->
getMesh
()
->
scale
(
Eigen
::
UniformScaling
<
double
>
(
0.15
));
//0.2
targetModel
->
getMesh
()
->
translat
e
(
Eigen
::
Translation3d
(
0
,
0.02
,
0.02
));
targetModel
->
getMesh
()
->
scale
(
Eigen
::
UniformScaling
<
double
>
(
0.15
));
staticTarget
->
setModel
(
targetModel
);
targetModel
->
setRenderDetail
(
meshRenderDetail2
);
...
...
@@ -133,7 +134,6 @@ bool createCameraNavigationScene(
q
.
normalize
();
targetModel
->
getMesh
()
->
rotate
(
q
);
}
return
true
;
}
...
...
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