SlideShare a Scribd company logo
1 of 33
Download to read offline
MATLAB Programming
STL File and Final Project
盧家鋒 Chia-Feng Lu, Ph.D.
Department of Biomedical Imaging
and Radiological Sciences, NYCU
alvin4016@nycu.edu.tw
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Please install MeshLab software
▹ MeshLab
■ https://www.meshlab.net/#download
2
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Contents
▹ Generate stereolithography(STL) file
▹ Instruction of final project
3
http://cflu.lab.nycu.edu.tw/CFLu_course_matlabimage.html
Please download the handout and materials from
產生STL模型檔
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Faces & Vertices
▹ A=zeros(10,10,10);
▹ A(2:9,2:9,2:9)=1;
▹ [F,V] = isosurface(A,0);
Face #1
V1
V2
V3
Face #2 V4
1 2 3
2 3 4
4 10 2
5 2 1
5 1 2
5 3 1
F (Faces) V (Vertices)
Each face is composed of 3 vertices.
5
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
6
Patch of a Cube
▹ A=zeros(10,10,10);
▹ A(2:9,2:9,2:9)=1;
▹ [F,V] = isosurface(A,0);
▹ figure
▹ patch('Faces',F,'Vertices',V,'FaceColor',[0 1 0])
▹ lighting gouraud, camlight(0,0), view(30,30)
▹ axis equal
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
STL format
▹ ASCII STL
■ Start with solid name
■ The file continues with any number of triangles,
each represented as follows:
■ The file concludes with endsolid name
7
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
8
STL format
▹ ASCII STL Open MImaterials_L13cube_ascii.stl using NotePad (記事本)
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
STL format
▹ Binary STL
■ Each triangle is described by twelve 32-bit
floating-point numbers
Binary STL has a
smaller file size.
9
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Export STL
▹ stlwrite function (released by Sven Holcombe)
10
https://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-
ascii-or-binary-stl-files
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Export STL
▹ stlwrite function (released by Sven Holcombe)
stlwrite('FILENAME',faces,vertices,'MODE','ascii','TITLE','NAME')
stlwrite('FILENAME',faces,vertices,'MODE',‘binary','TITLE','NAME')
Examples:
stlwrite('cube_ascii.stl',F,V,'mode','ascii','title','CubeDemo')
stlwrite('cube_binary.stl',F,V,'mode','binary','title','CubeDemo')
11
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Dental CT Images
Original CT images Reconstructed 3D Surface Model
12
What we had last week….
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Dental Surface Model
13
Please select an appropriate threshold value.
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
14
Close up the Mesh
▹ Creating zero layers in the first and last slices.
https://youtu.be/LfttaAepYJ8
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Dental STL Model
15
MImaterials_L13Dental_STL.m
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
STL Model Clean & Repair
16
Instruction of
Final Project
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
18
Syllabus – 3D Rendering & Printing
Week Topic
11 Graphic structure - curve and image display
12 3D object rendering - surface and volume rendering
13 (12/8) Introduction of 3D printing and STL file output
14 (12/15)
~
15 (12/22)
1. Operation of Slicer (G-code file) and 3D printer (self learning)
2. 3D printing hands-on at NYCU Maker Space
3. Video recording (10 min)
Please provide photos of 3D printing at MakerSpace, explanation of MATLAB
codes, product showcase, problem/solution & discussion, and work assignment.
All the required files of final report should be uploaded to E3 before 12/28
16 (12/29)
Final discussion at classroom in person
(Please bring your headphone!)
You may record the team report using Google Meet or screen recorder software.
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
Slicer and 3D Printer
▹ Creality Slicer
■ https://former.creality.com/download
▹ Operation of Slicer and 3D Printer (self-learning materials)
■ Video: https://youtu.be/xvOvckeYrKg
■ Handout: http://cflu.lab.nycu.edu.tw/Introduction_Slicer_Printer_CF.pdf
19
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
20
Final Report Files
▹ Final report video (10 min)
■ Photos of 3D printing at MakerSpace, explanation of
MATLAB codes, product showcase, problem/solution &
discussion, and work assignment.
▹ Please upload all the required files of final report to E3
system before 12/28:
■ 10-min video (*.mp4); Can be a YouTube or Google Drive link if the file size is too large.
■ PowerPoint file
■ Script file (*.m)
■ STL file
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
21
Work Assignment 小組分工範例
▹ MATLAB programming
(image processing, ROI, modeling)
▹ G-code file generation using Slicer software
▹ 3D printing (group photos at MakerSpace)
▹ PowerPoint slides and product presentation
▹ Video recording (should include all the group members)
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
22
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
23
Dental CT
+ roipoly & proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
24
Skull CT
+ Image interpolation and smoothing
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
25
L-Spine CT
+ Image interpolation and smoothing
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
26
L-Spine CT
Photos shared by Team #2
CR-2020
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
28
Pelvis CT
+ slice selection & proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
29
Upper limb CT
+ roipoly & proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
30
Lower limb CT
+ (roipoly) & proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
32
Brain MRI + roipoly & proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
33
Total body CT + proper thresholding
http://cflu.lab.nycu.edu.tw, Chia-Feng Lu
34
Rat skull microCT
+ proper thresholding
THE END
alvin4016@nycu.edu.tw

More Related Content

Similar to MatlabImage_Class13_CFLu.pdf

Online_Examination
Online_ExaminationOnline_Examination
Online_Examination
Rupam Dey
 
Powell lynetta storyboard_week4
Powell lynetta storyboard_week4Powell lynetta storyboard_week4
Powell lynetta storyboard_week4
Walden University
 
Powell lynetta storyboard_week6
Powell lynetta storyboard_week6Powell lynetta storyboard_week6
Powell lynetta storyboard_week6
Walden University
 
Screencasting for Staff and Student Development - MAME 2010
Screencasting for Staff and Student Development - MAME 2010Screencasting for Staff and Student Development - MAME 2010
Screencasting for Staff and Student Development - MAME 2010
mikitchenlady
 

Similar to MatlabImage_Class13_CFLu.pdf (20)

Module 5 task 1 laura vilar
Module 5 task 1 laura vilarModule 5 task 1 laura vilar
Module 5 task 1 laura vilar
 
process control instrumentation lab and labview report
process control  instrumentation lab and labview  reportprocess control  instrumentation lab and labview  report
process control instrumentation lab and labview report
 
Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installi...
Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installi...Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installi...
Quantitative Methods for Lawyers - Bonus Module - Introduction to R, Installi...
 
Federated Non-Traditional Practical Work for Engineering Education
Federated Non-Traditional Practical Work for Engineering EducationFederated Non-Traditional Practical Work for Engineering Education
Federated Non-Traditional Practical Work for Engineering Education
 
Online_Examination
Online_ExaminationOnline_Examination
Online_Examination
 
Iste13 carruthers
Iste13 carruthersIste13 carruthers
Iste13 carruthers
 
Powell lynetta storyboard_week4
Powell lynetta storyboard_week4Powell lynetta storyboard_week4
Powell lynetta storyboard_week4
 
Year 5-6: Ideas for teaching coding
Year 5-6: Ideas for teaching codingYear 5-6: Ideas for teaching coding
Year 5-6: Ideas for teaching coding
 
Powell lynetta storyboard_week6
Powell lynetta storyboard_week6Powell lynetta storyboard_week6
Powell lynetta storyboard_week6
 
A brief history of automation in Software Engineering
A brief history of automation in Software EngineeringA brief history of automation in Software Engineering
A brief history of automation in Software Engineering
 
Screencasting presentation-used in demo modified
Screencasting presentation-used in demo modifiedScreencasting presentation-used in demo modified
Screencasting presentation-used in demo modified
 
Screencasting for Staff and Student Development - MAME 2010
Screencasting for Staff and Student Development - MAME 2010Screencasting for Staff and Student Development - MAME 2010
Screencasting for Staff and Student Development - MAME 2010
 
Delivering information to students 24/7 with Camtasia.
Delivering information to students 24/7 with Camtasia.Delivering information to students 24/7 with Camtasia.
Delivering information to students 24/7 with Camtasia.
 
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
 
scratch-3-tutorial.pdf
scratch-3-tutorial.pdfscratch-3-tutorial.pdf
scratch-3-tutorial.pdf
 
Face Detection And Tracking
Face Detection And TrackingFace Detection And Tracking
Face Detection And Tracking
 
Por que (não) Lua? - Esquenta do Hackathon CAF FIESP 2015
Por que (não) Lua? - Esquenta do Hackathon CAF FIESP 2015Por que (não) Lua? - Esquenta do Hackathon CAF FIESP 2015
Por que (não) Lua? - Esquenta do Hackathon CAF FIESP 2015
 
MCLI Technology Tools in the Classroom - Elie Chmouni v2
MCLI Technology Tools in the Classroom - Elie Chmouni v2MCLI Technology Tools in the Classroom - Elie Chmouni v2
MCLI Technology Tools in the Classroom - Elie Chmouni v2
 
Technology Tools in the Classroom - Elie Chmouni
Technology Tools in the Classroom - Elie ChmouniTechnology Tools in the Classroom - Elie Chmouni
Technology Tools in the Classroom - Elie Chmouni
 
Programming Without Coding Technology (PWCT) Getting Started - The Time Machine
Programming Without Coding Technology (PWCT)  Getting Started - The Time MachineProgramming Without Coding Technology (PWCT)  Getting Started - The Time Machine
Programming Without Coding Technology (PWCT) Getting Started - The Time Machine
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 

Recently uploaded (20)

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 

MatlabImage_Class13_CFLu.pdf