From 71e5cb4961eba0a9f33037e2d51c4277091a6974 Mon Sep 17 00:00:00 2001 From: aidanmorales <130003551+aidanmorales@users.noreply.github.com> Date: Thu, 7 Nov 2024 19:10:27 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20aidanmor?= =?UTF-8?q?ales/rTwig@1466fe7fa7226752175d03b3b7062ee19571e3af=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- LICENSE.html | 2 +- articles/Box-Dimension.html | 2 +- articles/Dictionary.html | 2 +- articles/Metrics.html | 2 +- articles/Overview.html | 2 +- articles/Twigs.html | 2 +- articles/Validation.html | 2 +- articles/index.html | 2 +- authors.html | 6 +++--- index.html | 2 +- news/index.html | 2 +- pkgdown.yml | 2 +- reference/box_dimension.html | 2 +- reference/cluster_cloud.html | 2 +- reference/correct_radii.html | 2 +- reference/export_mat.html | 2 +- reference/export_mesh.html | 2 +- reference/import_qsm.html | 2 +- reference/import_treegraph.html | 2 +- reference/index.html | 2 +- reference/plot_qsm.html | 2 +- reference/prune_qsm.html | 2 +- reference/qsm_summary.html | 2 +- reference/rTwig-package.html | 2 +- reference/run_rtwig.html | 2 +- reference/smooth_qsm.html | 2 +- reference/standardize_qsm.html | 2 +- reference/tree_metrics.html | 2 +- reference/twigs.html | 2 +- reference/update_cylinders.html | 2 +- search.json | 2 +- 32 files changed, 34 insertions(+), 34 deletions(-) diff --git a/404.html b/404.html index 5deb768..dbfe877 100644 --- a/404.html +++ b/404.html @@ -27,7 +27,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/LICENSE.html b/LICENSE.html index 65fe88a..ff0d20d 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Box-Dimension.html b/articles/Box-Dimension.html index 8f7bf80..60ed89d 100644 --- a/articles/Box-Dimension.html +++ b/articles/Box-Dimension.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Dictionary.html b/articles/Dictionary.html index a432077..8856f6a 100644 --- a/articles/Dictionary.html +++ b/articles/Dictionary.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Metrics.html b/articles/Metrics.html index 1a6f72f..e51a218 100644 --- a/articles/Metrics.html +++ b/articles/Metrics.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Overview.html b/articles/Overview.html index 7ab86ea..7ccd9c6 100644 --- a/articles/Overview.html +++ b/articles/Overview.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Twigs.html b/articles/Twigs.html index a2754dd..3d42a52 100644 --- a/articles/Twigs.html +++ b/articles/Twigs.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/Validation.html b/articles/Validation.html index 0cde1ec..c1a892e 100644 --- a/articles/Validation.html +++ b/articles/Validation.html @@ -26,7 +26,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/articles/index.html b/articles/index.html index 2b4ccd8..30b3dd7 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/authors.html b/authors.html index f131f90..d51ae74 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 @@ -64,13 +64,13 @@ Citation Morales A, MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. -R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. +R package version 1.2.0, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. @Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, - note = {R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig}, + note = {R package version 1.2.0, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, } Morales A, MacFarlane D (2024). diff --git a/index.html b/index.html index 7fbd9c1..7516ba6 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/news/index.html b/news/index.html index daa2a56..1470070 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/pkgdown.yml b/pkgdown.yml index e243bd2..c35d4fe 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -8,7 +8,7 @@ articles: Overview: Overview.html Twigs: Twigs.html Validation: Validation.html -last_built: 2024-11-07T19:00Z +last_built: 2024-11-07T19:09Z urls: reference: https://aidanmorales.github.io/rTwig/reference article: https://aidanmorales.github.io/rTwig/articles diff --git a/reference/box_dimension.html b/reference/box_dimension.html index d599203..19a48ed 100644 --- a/reference/box_dimension.html +++ b/reference/box_dimension.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/cluster_cloud.html b/reference/cluster_cloud.html index 952b063..1ec97af 100644 --- a/reference/cluster_cloud.html +++ b/reference/cluster_cloud.html @@ -17,7 +17,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/correct_radii.html b/reference/correct_radii.html index 6444ac3..1253352 100644 --- a/reference/correct_radii.html +++ b/reference/correct_radii.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/export_mat.html b/reference/export_mat.html index b2e3ecd..e9c3dd0 100644 --- a/reference/export_mat.html +++ b/reference/export_mat.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/export_mesh.html b/reference/export_mesh.html index b581644..dcfc95e 100644 --- a/reference/export_mesh.html +++ b/reference/export_mesh.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/import_qsm.html b/reference/import_qsm.html index dbb1623..80fc4b2 100644 --- a/reference/import_qsm.html +++ b/reference/import_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/import_treegraph.html b/reference/import_treegraph.html index fe0116e..1723654 100644 --- a/reference/import_treegraph.html +++ b/reference/import_treegraph.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/index.html b/reference/index.html index 85e43aa..c3691ba 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/plot_qsm.html b/reference/plot_qsm.html index 818c11f..8a1317e 100644 --- a/reference/plot_qsm.html +++ b/reference/plot_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/prune_qsm.html b/reference/prune_qsm.html index a04b76c..7ba51ea 100644 --- a/reference/prune_qsm.html +++ b/reference/prune_qsm.html @@ -13,7 +13,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/qsm_summary.html b/reference/qsm_summary.html index 14a5283..6a72c39 100644 --- a/reference/qsm_summary.html +++ b/reference/qsm_summary.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/rTwig-package.html b/reference/rTwig-package.html index 5568440..5d331fe 100644 --- a/reference/rTwig-package.html +++ b/reference/rTwig-package.html @@ -9,7 +9,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/run_rtwig.html b/reference/run_rtwig.html index 2ee2f63..723b339 100644 --- a/reference/run_rtwig.html +++ b/reference/run_rtwig.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/smooth_qsm.html b/reference/smooth_qsm.html index 39de3b7..6d34554 100644 --- a/reference/smooth_qsm.html +++ b/reference/smooth_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/standardize_qsm.html b/reference/standardize_qsm.html index f1d256e..6b1b8cc 100644 --- a/reference/standardize_qsm.html +++ b/reference/standardize_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/tree_metrics.html b/reference/tree_metrics.html index f6a34c4..9f082fc 100644 --- a/reference/tree_metrics.html +++ b/reference/tree_metrics.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/twigs.html b/reference/twigs.html index 1d2ebe6..1fcec5c 100644 --- a/reference/twigs.html +++ b/reference/twigs.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/update_cylinders.html b/reference/update_cylinders.html index 9c016e4..d019a60 100644 --- a/reference/update_cylinders.html +++ b/reference/update_cylinders.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/search.json b/search.json index 9ad37b6..a0f8cc2 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Box-Dimension","text":"Box dimension measure structural complexity object. grounded theoretical fractal analysis applied three-dimensional point cloud data. method uses box counting (appropriately voxel counting), relationship total number boxes needed contain point cloud box size structural complexity point cloud. Box dimension slope simple linear equation log number boxes, log inverse box size. larger R-squared value indicates self similarity point cloud. Box dimension ranges 1 (line) 3 (solid cube). box dimension 2.72 special object known Menger sponge, zero volume infinite surface area. individual trees box dimension 1 2.2. Box dimension sensitive resolution level occlusion point cloud. low resolution can lead oversimplification, much occlusion can lead boxes used contain cloud box size decreases. good quality point cloud low occlusion resolution 0-1 cm optimal calculating box dimension.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Box-Dimension","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Box-Dimension","text":"first step load rTwig package.","code":"library(rTwig)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-point-cloud","dir":"Articles","previous_headings":"","what":"Load Point Cloud","title":"Box-Dimension","text":"Now need load point cloud. Box dimension can run point cloud, single trees, entire forest stands. Let’s use example Kentucky coffee tree.","code":"file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"box-dimension","dir":"Articles","previous_headings":"","what":"Box Dimension","title":"Box-Dimension","text":"Now can calculate box dimension point cloud box_dimension function. need specify location x, y, z coordinates, defaults first three columns point cloud data frame. can also set lower cutoff, smallest box size. Since point cloud resolution 1 cm, set lowercutoff parameter 0.01 m, also default. Let’s take look summary data extract box dimension (slope).","code":"# Box Dimension Summary output <- box_dimension(cloud) str(output) #> List of 2 #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 9 obs. of 2 variables: #> ..$ log.box.size: num [1:9] 0 0.693 1.386 2.079 2.773 ... #> ..$ log.voxels : num [1:9] 1.1 1.95 3.09 4.11 5.18 ... #> ..- attr(*, \".internal.selfref\")= #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 1 obs. of 4 variables: #> ..$ r.squared : num 1 #> ..$ adj.r.squared: num 1 #> ..$ intercept : num 1.02 #> ..$ slope : num 1.48 # Box Dimension (slope) output[[2]]$slope #> [1] 1.483312"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Box-Dimension","text":"can also plot results 2D 3D plots, setting plot parameter 2D, 3D . plot parameter set FALSE default speed calculations.","code":"# 2D Plot output <- box_dimension(cloud, plot = \"2D\") # 3D Plot output <- box_dimension(cloud, plot = \"3D\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Dictionary","text":"Real Twig allows QSM variable names standardized across TreeQSM, SimpleForest, Treegraph, aRchi. done standardize_qsm() function, creates consistent experience working QSMs. detailed definitions variable names using rTwig QSM format.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"cylinder-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Cylinder Attributes","title":"Dictionary","text":"start: defines x, y, z coordinates center cylinder’s base. axis: defines x, y, z axis formed cylinder’s base top. end: defines x, y, z coordinates center cylinder’s top. id: first cylinder id 1 base tree. largest id value equal number rows data frame. parent: shows relationships individual cylinders QSM. parent first cylinder always zero, base tree parent. Within branch, parent cylinders always one less child. base branch, parent cylinder cylinder branch connected . radius: radius cylinder meters. raw_radius: radius cylinder possible modifications. using TreeQSM, always UnmodRadius column. using SimpleForest Treegraph, copy radius Real Twig run. Real Twig always uses radius corrections. modified: average index cylinder radius outlier modified Real Twig across QSM paths. value 0 indicates cylinder never modified path, value 1 indicates modified every path. value 0 1 modified , paths. length: length cylinder meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"branch-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Branch Attributes","title":"Dictionary","text":"branch: branch defined starting new branch order continuing twig reached. definition TreeQSM Treegraph use. SimpleForest branches converted definition standardizing QSM. first branch always main stem rTwig format. Treegraph QSMs retain definition branches. TreeQSM SimpleForest numbered consecutively order cylinder ids. branch_position: index cylinder’s position within branch. TreeQSM’s PositionInBranch definition. first position always base branch, last position always twig branch end case broken branch. branch_order: order every branch. smallest branch order zero always main stem. First order branches connected main stem, forth higher order branches. new branch order always begins new branching fork, continues twig end broken branch, one greater parent order. definition consistent TreeQSM, SimpleForest, Treegraph, rTwig format always defines main stem order zero consistency. reverse_order: reverse branch order (RBO). Traditional branch ordering relative main stem, tell us anything position size branch. Small twigs large branches can first order branches connected main stem traditional definition. RBO solves problem considering relative position branches within QSM. RBO assigns value one end twigs broken branches, works backwards base tree reached, assigned highest RBO. RBO branch maximum segment (internode) depth relative twigs tree. branch_alt: alternate branch index. Alternate branch zero always main stem. rest branches first order branches children. similar cutting first order branches saw labeling consecutively. using SimpleForest QSM, old branchID column updated main stem index zero.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"segment-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Segment Attributes","title":"Dictionary","text":"segment: segment (internode) portion tree branching forks (nodes). new segment begins every branch fork. Cylinders part segment cylinder one child new segment created. rTwig format always defines base tree first segment. parent_segment: shows relationships segments QSM. parent segment first segment always zero, first segment (base tree) parent segment. parent segment node current segment forked . total_children: total number cylinders supported given cylinder. useful find branches fork. value one means branching forks. value two means one branching fork, etc.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"additional-metrics","dir":"Articles","previous_headings":"Dictionary","what":"Additional Metrics","title":"Dictionary","text":"growth_length: growth length meters given cylinder. Growth length can defined sum lengths cylinders supported given cylinder. can visualize growth length cutting tree saw given point. cumulative length cut portion growth length part tree cut. growth length base tree sum lengths cylinders QSM. growth length twig simply length cylinder. Growth length reflects measurement taken real tree, easier obtain QSMs. base_distance: distance meters given cylinder base tree. distance calculated taking simplest complete path given cylinder base tree. twig_distance: average distance meters given cylinder away supported twigs. calculated finding complete simple paths given cylinder supported twigs, summing lengths, dividing number paths. vessel_volume: theoretical cumulative volume living vessels supported given cylinder based allometric scaling theory. sum pipe_area * length supported cylinders. pipe_area: theoretical cross-sectional area given cylinder based allometric scaling theory. units values total number supported twigs. pipe_radius: theoretical radius given cylinder based allometric scaling theory. units values square root total number supported twigs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Metrics","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr, tidyr, ggplot packages help data manipulation visualization, ggpubr multi-panel plots, rgl point cloud plotting.","code":"devtools::install_github(\"https://github.com/aidanmorales/rTwig\") # Load rTwig library(rTwig) # Other useful packages library(rgl) library(tidyr) library(dplyr) library(ggplot2) library(ggpubr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"run-real-twig-calculate-metrics","dir":"Articles","previous_headings":"","what":"Run Real Twig & Calculate Metrics","title":"Metrics","text":"Next, let’s run Real Twig run_rtwig() calculate tree metrics tree_metrics().","code":"# File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Run Real Twig cylinder <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) # Calculate detailed tree metrics metrics <- tree_metrics(cylinder)"},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"point-cloud","dir":"Articles","previous_headings":"Run Real Twig & Calculate Metrics","what":"Point Cloud","title":"Metrics","text":"can even plot simulated point cloud rgl library, look cylinder connectivity.","code":"plot_qsm(cylinder, qsm$cylinder, cloud = metrics$cloud, skeleton = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"plotting-code","dir":"Articles","previous_headings":"","what":"Plotting Code","title":"Metrics","text":"","code":"# Stem Taper ------------------------------------------------------------------- metrics$stem_taper %>% ggplot(aes(x = height_m, y = diameter_cm)) + geom_point() + stat_smooth(method = \"loess\", color = \"black\", formula = y ~ x) + theme_classic() + labs( title = \"Stem Taper\", x = \"Height (m)\", y = \"Diameter (cm)\" ) # Tree Metrics ----------------------------------------------------------------- # Tree Height Distributions metrics$tree_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Tree Diameter Distributions metrics$tree_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Tree Zenith Distributions metrics$tree_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Tree azimuth distributions metrics$tree_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + theme_classic() + facet_wrap(~type) + theme(legend.position = \"right\") # Branch Metrics --------------------------------------------------------------- # Branch diameter distributions metrics$branch_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Branch height distributions metrics$branch_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Branch angle distributions metrics$branch_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch zenith distributions metrics$branch_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch azimuth distributions metrics$branch_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch order distributions metrics$branch_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = branch_order, y = value, color = branch_order, fill = branch_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Order Distributions\", x = \"\", y = \"\", fill = \"Branch Order\", color = \"Branch Order\" ) + facet_wrap(~type) + # Segment Metrics -------------------------------------------------------------- # Segment diameter distributions metrics$segment_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Segment height distributions metrics$segment_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Segment angle distributions metrics$segment_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + # Segment zenith distributions metrics$segment_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment azimuth distributions metrics$segment_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment order distributions metrics$segment_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = reverse_order, y = value, color = reverse_order, fill = reverse_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Reverse Order Distributions\", x = \"\", y = \"\", fill = \"Reverse Order\", color = \"Reverse Order\" ) + facet_wrap(~type) + theme_classic() # Spreads ---------------------------------------------------------------------- spreads <- metrics$spreads # Generate colors from red to blue n <- length(unique(spreads$height_class)) colors <- data.frame(r = seq(0, 1, length.out = n), g = 0, b = seq(1, 0, length.out = n)) # Convert colors to hex color_hex <- apply(colors, 1, function(row) { rgb(row[1], row[2], row[3]) }) # Assign colors to height classes height_class_colors <- data.frame( height_class = unique(spreads$height_class), color = color_hex ) spreads %>% left_join(height_class_colors, by = \"height_class\") %>% ggplot(aes(x = azimuth_deg, y = spread_m, group = height_class, color = color)) + geom_line() + scale_color_identity() + coord_polar(start = 0) + labs(x = \"\", y = \"\") + theme_minimal() + theme(axis.text.y = element_blank()) # Vertical profile ------------------------------------------------------------- metrics$spreads %>% group_by(height_class) %>% summarise( max = max(spread_m), mean = mean(spread_m), min = min(spread_m) ) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes(x = height_class, y = value, color = type)) + geom_line() + labs( x = \"Height Class\", y = \"Spread (m)\", color = \"\" ) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Overview","text":"Real Twig designed tested using QSMs created TreeQSM modeling software. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume within ± 10% real tree volume. given QSM provides parent-child cylinder relationships, Real Twig work, case SimpleForest, Treegraph, aRchi software packages. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume across multiple different software packages. Real Twig can provide excellent tree volume estimates, can transform poor quality data good data. general rule thumb, closer QSM resembles actual tree correction, better results correction. Real Twig performs best topology tree correct, cylinder sizes main sources QSM error. Errors QSM topology become readily apparent correction, Real Twig can also used visually validate QSM topology without reference data.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Overview","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr package help data manipulation.","code":"# Load rTwig library(rTwig) # Other useful packages library(dplyr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"import-qsm","dir":"Articles","previous_headings":"","what":"Import QSM","title":"Overview","text":"rTwig supports available versions TreeQSM, v2.0 v2.4.1 time writing. important note legacy versions TreeQSM (v2.0) store data much different format modern versions (v2.3.0-2.4.1). strongly advised use latest version TreeQSM rTwig best QSM topology volume estimates. Older versions can used, QSM topology poor, volume underestimation almost guaranteed. Regardless version TreeQSM MATLAB used, import_qsm() function import QSM (.mat extension) convert data format usable R. user must specify version TreeQSM using version parameter. rTwig automatically defaults use new TreeQSM format, older format can imported version = \"2.0\". import_qsm() also imports QSM information, including cylinder, branch, treedata, rundata, pmdistance, triangulation data, stored together list. SimpleForest exports QSMs .csv files, easy load R using built read.csv() function. QSM contains thousands cylinders, much faster use fread() function data.table package take advantage multi-threaded support. Treegraph exports QSMs .json files. import R, can use import_treegraph() function quickly load Treegraph QSM. aRchi built R, provided function import data. Users can extract aRchi cylinder data aRchi::get_QSM() running rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-1-treeqsm-v2-3-0---2-4-1","dir":"Articles","previous_headings":"Import QSM","what":"Example 1: TreeQSM v2.3.0 - 2.4.1","title":"Overview","text":"can import QSM supplying import_qsm() function directory QSM. QSM list six elements. can check follows: Let’s check version TreeQSM used, date QSM made, take look cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Import and save QSM qsm <- import_qsm(file) summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list # QSM info qsm$rundata$version #> [1] \"2.4.1\" qsm$rundata$start.date #> [1] \"2023-12-06 10:14:31 UTC\" # Number of cylinders str(qsm$cylinder) #> 'data.frame': 1136 obs. of 17 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ parent : int 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 2 3 4 5 6 7 8 9 10 11 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: int 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-2-treeqsm-v2-0","dir":"Articles","previous_headings":"Import QSM","what":"Example 2: TreeQSM v2.0","title":"Overview","text":"Let’s try importing old QSM check structure.","code":"# QSM Directory file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") # Import and save QSM qsm2 <- import_qsm(file, version = \"2.0\") # QSM Info summary(qsm2) #> Length Class Mode #> cylinder 15 data.frame list #> treedata 33 -none- list str(qsm2$cylinder) #> 'data.frame': 1026 obs. of 15 variables: #> $ radius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ length : num 0.335 0.283 0.272 0.244 0.267 ... #> $ start.x : num 8.4 8.43 8.44 8.47 8.5 ... #> $ start.y : num 47.7 47.7 47.7 47.8 47.8 ... #> $ start.z : num 2.23 2.57 2.85 3.12 3.36 ... #> $ axis.x : num 0.1103 0.0531 0.0878 0.1666 0.0894 ... #> $ axis.y : num 0.0337 0.0296 0.1282 0.0801 0.061 ... #> $ axis.z : num 0.993 0.998 0.988 0.983 0.994 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : num 1 2 3 4 5 6 7 8 9 10 ... #> $ added : int 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ branch : num 1 1 1 1 1 1 1 1 1 1 ... #> $ BranchOrder : num 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: num 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-3-simpleforest","dir":"Articles","previous_headings":"Import QSM","what":"Example 3: SimpleForest","title":"Overview","text":"Let’s take look SimpleForest cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Import and save QSM cylinder data cylinder <- read.csv(file) str(cylinder) #> 'data.frame': 1149 obs. of 17 variables: #> $ ID : int 0 1 2 3 4 5 6 7 8 9 ... #> $ parentID : int -1 0 1 2 3 4 5 6 7 8 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance: num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parentSegmentID : int -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branchID : int 0 0 0 0 0 0 0 0 0 0 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"cylinder-data","dir":"Articles","previous_headings":"","what":"Cylinder Data","title":"Overview","text":"Next, update parent-child ordering cylinder data allow path analysis add new QSM variables. important QSM variable growth length. Growth length cumulative length metric, growth length cylinder length, plus lengths children. gives us perfect ordering along branch path, highest growth length equal base tree, twigs growth length equal cylinder length. also important note number twigs QSM always equal number paths QSM, since path goes base tree twig tip. also calculate several additional variables improve QSM analysis visualization. reverse branch order (RBO) assigns order 1 twigs, works backwards base main stem, highest RBO. RBO essentially maximum node depth given branch segment (area branching forks). RBO problematic twig cylinders easy identify. distance cylinder base, average distance cylinder supported twigs new ways help visualize problematic cylinders. Let’s save cylinders new variable make easier work update ordering.","code":"# Save cylinders to new object cylinder <- qsm$cylinder # Update cylinder data cylinder <- update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"topology","dir":"Articles","previous_headings":"","what":"Topology","title":"Overview","text":"correct QSM, often worthwhile check quality QSM plotting input point cloud. , load point cloud save data frame, first three columns x, y, z columns. use plot_qsm() function . want check raw cylinder fits possible modification, use raw cylinder radii.","code":"# Load the input point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) # Plot the qsm and point cloud plot_qsm(cylinder = cylinder, cloud = cloud, radius = \"UnmodRadius\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"twig-diameters","dir":"Articles","previous_headings":"","what":"Twig Diameters","title":"Overview","text":"can correct QSM radii, need know real twig diameter . example tree, species Kentucky coffee tree (Gymnocladus dioicus), nice, stout twigs. rTwig comes data base twigs can called typing twigs data set. data set includes average twig radius, min max radius, standard deviation, coefficient variation. Let’s look twig data set find twig diameter Kentucky coffee tree.","code":"# Look at the twigs database twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows # Find our species filter(twigs, scientific_name == \"Gymnocladus dioicus\") #> # A tibble: 1 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Gymnocladus dioicus 4.23 30 2.79 6.6 0.87 0.2"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"summary-metrics","dir":"Articles","previous_headings":"","what":"Summary Metrics","title":"Overview","text":"correct QSM, Let’s take look current metrics, can compare tree volume correction. can qsm_summary() function. stem triangulation enabled TreeQSM, can use better represent main stem volume cases, especially large buttress flares. can also make plot radius versus growth length see much overestimation twig radii. Looking diagnostic plot log log scale, measured twig radius horizontal line, can see nearly twig radii overestimated, increasing radii variation growth length approaches zero. Except main stem, clear pattern individual branch tapering.","code":"# QSM summary qsm_summary(cylinder = cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.644 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 # QSM summary with Triangulation qsm_summary(cylinder = cylinder, radius = radius, triangulation = qsm$triangulation)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"correct-radii","dir":"Articles","previous_headings":"","what":"Correct Radii","title":"Overview","text":"Now can correct QSM cylinder radii correct_radii() function. step, model path tree separately, poorly fit cylinders identified removed, GAM fit, intercept measured twig radius, growth length predicts cylinder radius. Let’s correct cylinder radii Kentucky coffee tree look new volume estimates diagnostic plots. can see reduced volume QSM around 3 liters, around 15% overestimation volume correction. Kentucky coffee tree relatively large twigs, overestimation severe tree much smaller twigs, can upwards >200% overestimation cases. Looking diagnostic plot, can see individual branches can clearly identified unique allometry. Notice nearly volume reduction occurred higher order branches, main stem remaining nearly unchanged. branches now taper towards measured twig radius Kentucky coffee tree. Getting real twig diameter critical, high value overestimate volume, low value underestimate total volume, underestimate proportional number twigs small branches tree. species available database, found genus level twig radius average good substitute.","code":"# Correct cylinder radii cylinder <- correct_radii(cylinder, twig_radius = 4.23) # Corrected QSM summary qsm_summary(cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.640 #> 2 1 5.20 0.754 #> 3 2 2.69 0.583 #> 4 3 0.539 0.170 #> 5 4 0.104 0.0431 #> 6 5 0.00683 0.00308"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Overview","text":"Optionally, can smooth QSM ensuring cylinders connected. visual change affect volume estimates. can smooth_qsm() function, plot results plot_qsm() function. different colors different branch orders. can also color QSM many different variables palettes. See plot_qsm() documentation details. can also save QSM mesh (.ply extension) use modeling programs export_mesh() function. colors palettes found plot_qsm() function can used color mesh.","code":"# Smooth QSM cylinder <- smooth_qsm(cylinder) # Plot QSM plot_qsm(cylinder) # QSM Custom Colors & Piping cylinder %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"magma\" ) # Plot Twigs Colored by Unique Segment cylinder %>% filter(reverseBranchOrder == 1) %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"rainbow\" ) # Export Mesh Colored by RBO cylinder %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"magma\" ) # Export Twigs Colored by Unique Segments cylinder %>% filter(reverseBranchOrder == 1) %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"rainbow\" )"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"workflow-best-practices","dir":"Articles","previous_headings":"","what":"Workflow & Best Practices","title":"Overview","text":"overview typical rTwig processing chain. dealing multiple trees, advise creating master data frame tidy format, unique tree row, columns tree id, directory QSM .mat file, species twig diameter, can tailored workflow needs. simple matter looping master data frame, correcting tree, saving results master list. Make sure read function’s documentation examples unique features.","code":"# Import QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Real Twig Main Steps cylinder <- run_rtwig(file, twig_radius = 4.23) # Tree Metrics metrics <- tree_metrics(cylinder) # Plot Results plot_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Twigs","text":"Twigs smallest ground woody component tree. Twigs responsible supporting delicate tissues needed grow leaves protect buds dormant season. twig measurements basis Real Twig method, publicly available databases twigs limited, present database twig measurements wide range tree genera species.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Twigs","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Twigs","text":"first step load rTwig package.","code":"library(rTwig) #> Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display #> Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. # Useful packages library(dplyr) library(ggplot2)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"twig-database","dir":"Articles","previous_headings":"","what":"Twig Database","title":"Twigs","text":"twig database built directly rTwig can called follows: database broken 7 different columns. scientific_name specific epithet. Genus spp. average species genus. radius_mm twig radius millimeters. species, n number unique twig samples taken, min minimum twig radius, max max twig radius, std standard deviation, cv coefficient variation. Let’s see breakdown species.","code":"# If the rTwig library has been loaded twigs # If rTwig hasn't been loaded, but just the twigs are needed rTwig::twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows unique(twigs$scientific_name) #> [1] \"Abies concolor\" \"Abies spp.\" #> [3] \"Acer platanoides\" \"Acer rubrum\" #> [5] \"Acer saccharinum\" \"Acer saccharum\" #> [7] \"Acer spp.\" \"Aesculus flava\" #> [9] \"Aesculus spp.\" \"Betula nigra\" #> [11] \"Betula spp.\" \"Carya cordiformis\" #> [13] \"Carya ovata\" \"Carya spp.\" #> [15] \"Castanea dentata\" \"Castanea spp.\" #> [17] \"Cercis canadensis\" \"Cercis spp.\" #> [19] \"Cladrastis kentukea\" \"Cladrastis spp.\" #> [21] \"Cornus mas\" \"Cornus officinalis\" #> [23] \"Cornus spp.\" \"Crataegus spp.\" #> [25] \"Fagus grandifolia\" \"Fagus spp.\" #> [27] \"Fagus sylvatica\" \"Fraxinus americana\" #> [29] \"Fraxinus pennsylvanica\" \"Fraxinus quadrangulata\" #> [31] \"Fraxinus spp.\" \"Ginkgo biloba\" #> [33] \"Ginkgo spp.\" \"Gleditsia spp.\" #> [35] \"Gleditsia triacanthos\" \"Gymnocladus dioicus\" #> [37] \"Gymnocladus spp.\" \"Gymnopodium floribundum\" #> [39] \"Gymnopodium spp.\" \"Juglans cinerea\" #> [41] \"Juglans nigra\" \"Juglans spp.\" #> [43] \"Laguncularia racemosa\" \"Laguncularia spp.\" #> [45] \"Larix laricina\" \"Larix spp.\" #> [47] \"Liquidambar spp.\" \"Liquidambar styraciflua\" #> [49] \"Liriodendron spp.\" \"Liriodendron tulipifera\" #> [51] \"Magnolia acuminata\" \"Magnolia spp.\" #> [53] \"Malus spp.\" \"Metasequoia glyptostroboides\" #> [55] \"Metasequoia spp.\" \"Nyssa spp.\" #> [57] \"Nyssa sylvatica\" \"Ostrya spp.\" #> [59] \"Ostrya virginiana\" \"Phellodendron amurense\" #> [61] \"Phellodendron spp.\" \"Picea abies\" #> [63] \"Picea omorika\" \"Picea pungens\" #> [65] \"Picea spp.\" \"Pinus nigra\" #> [67] \"Pinus spp.\" \"Pinus strobus\" #> [69] \"Platanus acerifolia\" \"Platanus occidentalis\" #> [71] \"Platanus spp.\" \"Populus deltoides\" #> [73] \"Populus spp.\" \"Prunus serotina\" #> [75] \"Prunus spp.\" \"Prunus virginiana\" #> [77] \"Quercus acutissima\" \"Quercus alba\" #> [79] \"Quercus bicolor\" \"Quercus coccinea\" #> [81] \"Quercus ellipsoidalis\" \"Quercus imbricaria\" #> [83] \"Quercus macrocarpa\" \"Quercus michauxii\" #> [85] \"Quercus muehlenbergii\" \"Quercus palustris\" #> [87] \"Quercus robur\" \"Quercus rubra\" #> [89] \"Quercus shumardii\" \"Quercus spp.\" #> [91] \"Quercus velutina\" \"Rhizophora mangle\" #> [93] \"Rhizophora spp.\" \"Thuja occidentalis\" #> [95] \"Thuja spp.\" \"Tilia americana\" #> [97] \"Tilia spp.\" \"Tilia tomentosa\" #> [99] \"Tsuga canadensis\" \"Tsuga spp.\" #> [101] \"Ulmus americana\" \"Ulmus pumila\" #> [103] \"Ulmus rubra\" \"Ulmus spp.\""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Twigs","text":"Let’s visualize twig data!","code":"# Lets look at a subset of oak species twigs %>% filter(grepl(\"Quercus\", scientific_name)) %>% ggplot(aes(x = scientific_name, y = radius_mm, color = scientific_name)) + geom_point(aes(size = n)) + geom_errorbar(aes(ymax = max, ymin = min)) + coord_flip() + labs( title = \"Quercus Twig Radii\", x = \"\", y = \"Twig Radius (mm)\", color = \"Species\", size = \"Sample Size\" ) + scale_x_discrete(limits = rev) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-4-1","dir":"Articles","previous_headings":"","what":"TreeQSM v2.4.1","title":"Validation","text":"mass estimates statistics using TreeQSM v2.4.1 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-3-0","dir":"Articles","previous_headings":"","what":"TreeQSM v2.3.0","title":"Validation","text":"mass estimates statistics using TreeQSM v2.3.0 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"simpleforest","dir":"Articles","previous_headings":"","what":"SimpleForest","title":"Validation","text":"important note Real Twig tested SimpleForest development. Real Twig improve volume estimates SimpleForest versus built allometric corrections, still improvements made, SimpleForest QSM cylinders generally much overestimated TreeQSM cylinders, making identification “good” cylinders difficult. mass estimates statistics using SimpleForest v5.3.2 built vessel volume correction, Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Aidan Morales. Author, maintainer, copyright holder. David W. MacFarlane. Author, copyright holder.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Morales , MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. Morales , MacFarlane D (2024). “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 1-16. doi:10.1093/forestry/cpae046.","code":"@Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, note = {R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, } @Article{, title = {Reducing tree volume overestimation in quantitative structure models using modeled branch topology and direct twig measurements}, author = {Aidan Morales and David W. MacFarlane}, journal = {Forestry: An International Journal of Forest Research}, year = {2024}, pages = {1-16}, doi = {https://doi.org/10.1093/forestry/cpae046}, }"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Realistic Quantitative Structure Models","text":"Real Twig method correct unrealistic cylinders quantitative structure models (QSMs), different traditional allometric statistical corrections. Small branch twig cylinders overestimated QSMs due technical limitations current LiDAR sensor technology. Real Twig overcomes limitations using real direct twig diameter measurements corresponding tree species inform individual path taper models QSM. Real Twig dynamically identifies realistic cylinders QSM using network analysis, general additive models, direct twig measurements, model correct unrealistic cylinders high degree precision accuracy vetted ground truth reference data. Real Twig method presented R package, rTwig. rTwig includes novel database twig diameter measurements many common North American European trees, make method immediately accessible user. addition, rTwig includes fast efficient tools QSM visualization analysis seamlessly compatible R ecosystem, point cloud fractal analysis visualization using box-dimension metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"method","dir":"","previous_headings":"","what":"Method","title":"Realistic Quantitative Structure Models","text":"complete description validation Real Twig can read : Aidan Morales, David W. MacFarlane. “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 2024, pp. 1-16. https://doi.org/10.1093/forestry/cpae046.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"realistic-trees","dir":"","previous_headings":"Features","what":"Realistic Trees","title":"Realistic Quantitative Structure Models","text":"main goal Real Twig correct volume overestimation QSMs caused limitations LiDAR sensors better non-destructive ground biomass (AGB) estimates. Real Twig incorporates direct twig measurement QSM, resulting models accurate volume metrics, also visually realistic, independent tree species size. example, shown 300+ year old white oak tree (Quercus alba), without Real Twig.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"efficient-visualization","dir":"","previous_headings":"Features","what":"Efficient Visualization","title":"Realistic Quantitative Structure Models","text":"plot_qsm() can plot QSMs point clouds, using rgl 3D display, C++ via Rcpp efficiently build cylinders. cylinders, simulated point cloud, skeleton can plotted colored variable user supplied color palette. can also visualize stem triangulation meshes TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"detailed-tree-metrics","dir":"","previous_headings":"Features","what":"Detailed Tree Metrics","title":"Realistic Quantitative Structure Models","text":"goal rTwig provide users tools visualize analyze QSM metrics without tied particular QSM software. end, standardize_qsm() provides consistent naming convention supported QSMs, making easy combine analyze QSMs different sources. tree_metrics() calculates major QSM metrics supported software. prune_qsm() can virtually prune tree using multiple input parameters. cluster_cloud() can transfer QSM metrics directly onto unorganized point cloud, simulate virtual point cloud. See vignettes function reference pages details.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"supported-software","dir":"","previous_headings":"Features","what":"Supported Software","title":"Realistic Quantitative Structure Models","text":"rTwig currently supports TreeQSM, SimpleForest, Treegraph, aRchi","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"functions","dir":"","previous_headings":"","what":"Functions","title":"Realistic Quantitative Structure Models","text":"run_rtwig() runs Real Twig method QSM import_qsm() imports QSM created TreeQSM (.mat) import_treegraph() imports QSM created Treegraph (.json) standardize_qsm() standardizes QSM variable names across supported software update_cylinders() updates cylinder relationships adds new QSM variables correct_radii models QSM paths corrects cylinder radii tree_metrics() generates detailed tree metrics simulated point cloud cluster_cloud() transfers QSM variables point cloud simulates point cloud qsm_summary() summarises QSM diameter, height, volume, surface area smooth_qsm() connects cylinder end--end smooth branch visualization plot_qsm() plots QSMs optionally point clouds prune_qsm() prunes QSM cylinder attributes, height, diameter classes export_mesh() exports QSM mesh object (.ply) export_mat() exports QSM MATLAB format (.mat) box_dimension() calculates visualizes structural complexity point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Realistic Quantitative Structure Models","text":"can install released version rTwig CRAN : can install development version rTwig GitHub :","code":"install.packages(\"rTwig\") # install.packages(\"devtools\") devtools::install_github(\"aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-real-twig","dir":"","previous_headings":"Installation","what":"Quick Start: Real Twig","title":"Realistic Quantitative Structure Models","text":"examples quickly run visualize Real Twig, using example data package. See vignettes details general workflow best practices.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treeqsm","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"TreeQSM","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"simpleforest","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"SimpleForest","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treegraph","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"Treegraph","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- \"path_to_treegraph_json\" # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"archi","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"aRchi","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-fractal-analysis","dir":"","previous_headings":"Installation","what":"Quick Start: Fractal Analysis","title":"Realistic Quantitative Structure Models","text":"rTwig also includes efficient function written C++ via Rcpp fractal analysis using voxel-counting method. example quickly calculate box-dimension point cloud using example data package. See vignette details explanation.","code":"# Load a point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file) # Calculate box-dimension output <- box_dimension(cloud) output[[2]]$slope"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":null,"dir":"Reference","previous_headings":"","what":"Box Dimension — box_dimension","title":"Box Dimension — box_dimension","text":"R port Dominik Seidel's fractal analysis \"box-dimension\" metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box Dimension — box_dimension","text":"","code":"box_dimension(cloud, lowercutoff = 0.01, rm_int_box = FALSE, plot = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box Dimension — box_dimension","text":"cloud point cloud matrix size n x 3. Non-matrices automatically converted matrix. lowercutoff smallest box size determined point spacing cloud meters. Defaults 1 cm. rm_int_box Remove initial box TRUE FALSE. Defaults FALSE. plot Plot results. user can specify \"2D\", \"3D\", \"\" plots. FALSE disables plotting. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box Dimension — box_dimension","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box Dimension — box_dimension","text":"box_dimension1rTwig box_dimension2rTwig box_dimension3rTwig box_dimension4rTwig box_dimension5rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box Dimension — box_dimension","text":"","code":"## Calculate Box Dimension file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) output <- box_dimension(cloud, plot = \"ALL\") #> Panning plot on rgl device: 1 output #> [[1]] #> # A tidytable: 9 × 2 #> log.box.size log.voxels #> #> 1 0 1.10 #> 2 0.693 1.95 #> 3 1.39 3.09 #> 4 2.08 4.11 #> 5 2.77 5.18 #> 6 3.47 6.14 #> 7 4.16 7.16 #> 8 4.85 8.23 #> 9 5.55 9.27 #> #> [[2]] #> # A tidytable: 1 × 4 #> r.squared adj.r.squared intercept slope #> #> 1 1.00 1.00 1.02 1.48 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster Cloud — cluster_cloud","title":"Cluster Cloud — cluster_cloud","text":"Cluster point cloud simulate point cloud based QSM. using input point cloud, cylinder ids transferred cloud using nearest neighbors. simulating cloud, points built directly cylinders user controlled spacing. cylinder id can used easily join desired variables QSM cloud. nearest neighbor search uses C++ nanoflann library.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster Cloud — cluster_cloud","text":"","code":"cluster_cloud(cylinder, cloud = NULL, spacing = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster Cloud — cluster_cloud","text":"cylinder QSM cylinder data frame. cloud input point cloud QSM cluster. NULL (default), simulated cloud returned. spacing point spacing meters simulated cloud. Defaults 0.02 meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster Cloud — cluster_cloud","text":"point cloud data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cluster Cloud — cluster_cloud","text":"blanco2014nanoflannrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster Cloud — cluster_cloud","text":"","code":"## Load Data file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") file2 <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii cloud <- read.table(file2) ## Clustered Cloud clustered_cloud <- cluster_cloud(cylinder = qsm, cloud = cloud) #> Clustering Point Cloud # # Join QSM variables and export # filename <- tempfile(pattern = \"clustered_cloud\", fileext = \".txt\") # clustered_cloud %>% # left_join(qsm) %>% # fwrite(file = filename) ## Simulated Cloud simulated_cloud <- cluster_cloud(cylinder = qsm, spacing = 0.01) #> Simulating Point Cloud # Plot Simulated Cloud plot_qsm(cloud = simulated_cloud) #> Plotting Cloud #> Panning plot on rgl device: 1 # # Join QSM variables and export # filename2 <- tempfile(pattern = \"simulated_cloud\", fileext = \".txt\") # simulated_cloud %>% # left_join(qsm) %>% # fwrite(file = filename2)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":null,"dir":"Reference","previous_headings":"","what":"Correct Radii — correct_radii","title":"Correct Radii — correct_radii","text":"Corrects cylinder radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correct Radii — correct_radii","text":"","code":"correct_radii(cylinder, twig_radius, broken_branch = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correct Radii — correct_radii","text":"cylinder QSM cylinder data frame twig_radius Twig radius millimeters broken_branch Enable disable broken branch filter. Defaults enabled (TRUE).","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correct Radii — correct_radii","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Correct Radii — correct_radii","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 30 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Export MAT — export_mat","title":"Export MAT — export_mat","text":"Exports cylinder data visualized TreeQSM's plot_cylinder_model() function","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export MAT — export_mat","text":"","code":"export_mat(cylinder, filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export MAT — export_mat","text":"cylinder QSM cylinder data frame filename Desired name file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export MAT — export_mat","text":"Returns .mat file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export MAT — export_mat","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":null,"dir":"Reference","previous_headings":"","what":"Export Mesh — export_mesh","title":"Export Mesh — export_mesh","text":"Exports QSM cylinder mesh using rgl library","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export Mesh — export_mesh","text":"","code":"export_mesh( cylinder, filename, radius = NULL, color = NULL, palette = NULL, facets = 6, normals = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export Mesh — export_mesh","text":"cylinder QSM cylinder data frame filename File name path exporting. .ply extension automatically added present. radius Radius column name either quoted unquoted. Defaults modified cylinders cylinder data frame. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. normals Option export normals. Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export Mesh — export_mesh","text":"mesh .ply file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export Mesh — export_mesh","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Import TreeQSM — import_qsm","title":"Import TreeQSM — import_qsm","text":"Imports QSM created TreeQSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import TreeQSM — import_qsm","text":"","code":"import_qsm(filename, version = \"2.x.x\")"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import TreeQSM — import_qsm","text":"filename TreeQSM .mat MATLAB file version TreeQSM version. Defaults 2.x.x. user can also specify 2.0 format.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import TreeQSM — import_qsm","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import TreeQSM — import_qsm","text":"TreeQSMrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import TreeQSM — import_qsm","text":"","code":"## Read a TreeQSM MATLAB file in the 2.3.x - 2.4.x format file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.x.x\") #> Importing TreeQSM summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list ## Read a TreeQSM MATLAB file in the 2.0 format file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.0\") #> Importing TreeQSM names(qsm) #> [1] \"cylinder\" \"treedata\""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Treegraph — import_treegraph","title":"Import Treegraph — import_treegraph","text":"Imports QSM created treegraph","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Treegraph — import_treegraph","text":"","code":"import_treegraph(filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Treegraph — import_treegraph","text":"filename treegraph .json file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Treegraph — import_treegraph","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import Treegraph — import_treegraph","text":"treegraph2rTwig treegraph1rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import Treegraph — import_treegraph","text":"","code":"if (FALSE) { # \\dontrun{ # Import a treegraph QSM qsm <- import_treegraph(\"path/to/json/file\") } # }"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot QSM — plot_qsm","title":"Plot QSM — plot_qsm","text":"Efficiently plot QSMs point clouds. Uses Rcpp RGL libraries backends.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot QSM — plot_qsm","text":"","code":"plot_qsm( cylinder = NULL, radius = NULL, color = NULL, palette = NULL, alpha = 1, facets = 6, skeleton = FALSE, skeleton_lwd = NULL, cloud = NULL, pt_color = NULL, pt_size = NULL, triangulation = NULL, tri_color = NULL, tri_palette = NULL, axes = TRUE, axes_color = NULL, grid = FALSE, grid_color = NULL, hover = FALSE, bg_color = NULL, lit = TRUE, pan = TRUE, normalize = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot QSM — plot_qsm","text":"cylinder QSM cylinder data frame. radius Radius column name either quoted unquoted. Defaults modified radii. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. alpha Set transparency cylinders. Defaults 1. 1 opaque 0 fully transparent. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. skeleton Plot QSM skeleton instead cylinders. Defaults FALSE. skeleton_lwd Skeleton line width. Defaults 1. cloud Point cloud data frame first three columns x, y, z coordinates coordinate system QSM. Defaults NULL. pt_color Color point cloud. Accepts hex colors, grDevices::colors(), \"random\". Defaults black. pt_size Size points. Defaults 0.1. triangulation Plot stem triangulation mesh TreeQSM. Defaults NULL. tri_color Color triangulation mesh. Colors must single hex color. tri_palette Optional triangulation color palette z values. Supports inputs palettes. axes Show plot axes. Defaults TRUE. axes_color Set axes color. Defaults black. grid Show plot grid lines. Defaults FALSE. grid_color Set grid lines color. Defaults grey. hover Show cylinder branch id mouse hover. Defaults FALSE. bg_color Set background color plot. Accepts hex colors grDevices::colors(). Defaults white. lit Enable light source plot. Defaults TRUE. Can set FALSE. pan Use right mouse button pan plot. Defaults TRUE, disabled hover enabled. normalize Normalize QSM 0,0,0 based provided data. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot QSM — plot_qsm","text":"rgl plot","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot QSM — plot_qsm","text":"","code":"## TreeQSM Processing Chain & Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 triangulation <- qsm$triangulation plot_qsm(triangulation = triangulation) #> Plotting Triangulation #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Prune QSM — prune_qsm","title":"Prune QSM — prune_qsm","text":"Efficiently prune QSM. user can prune cylinder, branch, segment ids, height diameter classes, individually, time, return either pruned data, remaining data, binary index cylinders pruned.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prune QSM — prune_qsm","text":"","code":"prune_qsm( cylinder, cylinder_ids = NULL, branch_ids = NULL, segment_ids = NULL, height_m = NULL, diameter_cm = NULL, invert = FALSE, index = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prune QSM — prune_qsm","text":"cylinder QSM cylinder data frame cylinder_ids single vector cylinder ids. Everything connected cylinder pruned. branch_ids single vector branch ids. Everything connected branch pruned. segment_ids single vector segment ids. Everything connected segment pruned. height_m Height class meters cylinders pruned. Valid inputs numeric one decimal. diameter_cm Branch diameter class centimeters cylinders pruned. Valid inputs numeric one decimal. invert Return remaining pruned data. Defaults TRUE (remaining data), can set FALSE. index Returns column index called pruning indicating cylinder pruned (1) un-pruned (0). Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prune QSM — prune_qsm","text":"data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prune QSM — prune_qsm","text":"","code":"## Load QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Pruning Index prune1 <- prune_qsm(cylinder, height_m = 2, index = TRUE) #> Pruning QSM plot_qsm(prune1, color = pruning, palette = \"blue2red\") #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Remaining prune2 <- prune_qsm(cylinder, height_m = 2, invert = FALSE) #> Pruning QSM plot_qsm(prune2) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Pruned prune3 <- prune_qsm(cylinder, height_m = 2, invert = TRUE) #> Pruning QSM plot_qsm(prune3) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"QSM Summary — qsm_summary","title":"QSM Summary — qsm_summary","text":"Generates simple QSM summary (e.g. volume, surface area, dbh, etc.) totals branch order.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"QSM Summary — qsm_summary","text":"","code":"qsm_summary(cylinder, radius, triangulation = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"QSM Summary — qsm_summary","text":"cylinder QSM cylinder data frame radius Radius column name either quoted unquoted. triangulation QSM triangulation list. Defaults NULL. supports TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"QSM Summary — qsm_summary","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"QSM Summary — qsm_summary","text":"","code":"## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics qsm_summary(cylinder, radius) #> Creating QSM Summary #> [[1]] #> # A tidytable: 5 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 12.9 0.768 #> 2 1 8.70 1.07 #> 3 2 6.46 0.871 #> 4 3 1.82 0.298 #> 5 4 0.0723 0.0148 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.39 3.67 12.9 17.1 30.0 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #> # TreeQSM Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics qsm_summary(cylinder, radius, triangulation = qsm$triangulation) #> Creating QSM Summary #> [[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.18 3.69 28.7 11.4 40.1 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rTwig: Realistic Quantitative Structure Models — rTwig-package","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Real Twig method correct branch overestimation quantitative structure models. Overestimated cylinders correctly tapered using measured twig diameters corresponding tree species. Supported quantitative structure modeling software includes 'TreeQSM', 'SimpleForest', 'Treegraph', 'aRchi'. Also included novel database twig diameters tools fractal analysis point clouds.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Maintainer: Aidan Morales moral169@msu.edu (ORCID) [copyright holder] Authors: David W. MacFarlane macfar24@msu.edu [copyright holder]","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Real Twig — run_rtwig","title":"Run Real Twig — run_rtwig","text":"Runs Real Twig steps","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Real Twig — run_rtwig","text":"","code":"run_rtwig( filename, twig_radius, metrics = TRUE, version = NULL, smooth = TRUE, standardize = FALSE, broken_branch = TRUE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Real Twig — run_rtwig","text":"filename file path QSM (.mat, .csv, .json) twig_radius Twig radius millimeters metrics Calculate tree metrics? Defaults TRUE. version Defaults NULL. using specific version TreeQSM, user can specify version (e.g. 2.4.1, 2.0, etc.). smooth Defaults TRUE, using TreeQSM. Can set FALSE. standardize Standardize QSM cylinder data? Defaults FALSE. Can set TRUE. broken_branch Enable disable broken branch filter. Defaults TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Real Twig — run_rtwig","text":"Returns cylinder data frame list metrics true.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Real Twig — run_rtwig","text":"","code":"## TreeQSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics str(qsm$cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.769 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.009949 -0.022059 0.016224 -0.000391 0.012068 ... #> $ axis.y : num 0.091165 0.019722 0.034392 -0.000295 0.023483 ... #> $ axis.z : num 0.996 1 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth QSM — smooth_qsm","title":"Smooth QSM — smooth_qsm","text":"Visual smoothing QSM ensuring midpoints cylinders connected","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth QSM — smooth_qsm","text":"","code":"smooth_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth QSM — smooth_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth QSM — smooth_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth QSM — smooth_qsm","text":"","code":"file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Before Smoothing plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## After Smoothing cylinder <- smooth_qsm(cylinder) #> Smoothing QSM plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize QSM — standardize_qsm","title":"Standardize QSM — standardize_qsm","text":"Standardizes QSM variable names ordering across different QSM software","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize QSM — standardize_qsm","text":"","code":"standardize_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize QSM — standardize_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize QSM — standardize_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize QSM — standardize_qsm","text":"Renames supported QSM software output columns consistent. names lower case underscore delimited. See dictionary vignette detailed description column names. consistent QSM format ensures maximum compatibility analyzing QSMs made different software. function can run either update_cylinders function run, stage.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize QSM — standardize_qsm","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 28 variables: #> $ start_x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis_y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis_z : num 0.996 0.999 0.999 1 1 ... #> $ end_x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ raw_radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 32.8 32.7 32.6 32.6 32.6 ... #> $ base_distance : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ twig_distance : num 3.4 3.31 3.24 3.17 3.16 ... #> $ vessel_volume : num 279 271 266 260 259 ... #> $ pipe_area : int 82 82 82 82 82 82 82 82 82 82 ... #> $ pipe_radius : num 9.06 9.06 9.06 9.06 9.06 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 28 variables: #> $ start_x : num 0.761 0.759 0.771 0.768 0.765 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axis_y : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axis_z : num 0.996 0.963 0.998 0.999 0.998 ... #> $ end_x : num 0.759 0.771 0.768 0.765 0.769 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ raw_radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : num 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 31.4 31.4 31.3 31.3 31.2 ... #> $ base_distance : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ twig_distance : num 3.43 3.38 3.33 3.27 3.22 ... #> $ vessel_volume : num 237 233 229 226 222 ... #> $ pipe_area : int 69 69 69 69 69 69 69 69 69 69 ... #> $ pipe_radius : num 8.31 8.31 8.31 8.31 8.31 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 28 variables: #> $ start_x : num 0.763 0.77 0.77 0.763 0.764 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axis_y : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axis_z : num 0.98 0.991 0.959 0.992 0.973 ... #> $ end_x : num 0.77 0.77 0.763 0.764 0.766 ... #> $ end_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ raw_radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 34.2 34.2 34.2 34.1 34.1 ... #> $ base_distance : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ twig_distance : num 3.44 3.38 3.36 3.33 3.3 ... #> $ vessel_volume : num 416 409 406 403 400 ... #> $ pipe_area : int 121 121 121 121 121 121 121 121 121 121 ... #> $ pipe_radius : num 11 11 11 11 11 11 11 11 11 11 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Tree Metrics — tree_metrics","title":"Tree Metrics — tree_metrics","text":"Calculates tree metrics QSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tree Metrics — tree_metrics","text":"","code":"tree_metrics(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tree Metrics — tree_metrics","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tree Metrics — tree_metrics","text":"Returns list tree metric data frames synthetic point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tree Metrics — tree_metrics","text":"Calculates detailed tree, branch, segment metrics QSM. outputs include standard outputs TreeQSM, also additional variables, including, limited , growth length, reverse branch order, branch segment node relationships, distances twigs base tree, across various distribution metrics. Also included simulated point cloud tree, based QSM cylinder radii. corrected Real Twig, allow testing validation point cloud diameter overestimation throughout tree.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tree Metrics — tree_metrics","text":"TreeQSMrTwig growth_parameter1rTwig growth_parameter2rTwig treegraph2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tree Metrics — tree_metrics","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") cylinder <- import_qsm(file)$cylinder #> Importing TreeQSM cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\" ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":null,"dir":"Reference","previous_headings":"","what":"Twig Database — twigs","title":"Twig Database — twigs","text":"Database twig radii common North American tree species","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Twig Database — twigs","text":"","code":"twigs"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"twigs","dir":"Reference","previous_headings":"","what":"twigs","title":"Twig Database — twigs","text":"data frame containing twig radii measurements scientific_name tree's genus species radius_mm average twig radius millimeters n twig measurement sample size min minimum twig radii samples max maximum twig radii samples std standard deviation twig radii cv coefficient variation twig radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Cylinders — update_cylinders","title":"Update Cylinders — update_cylinders","text":"Updates QSM cylinder data preparation radii correction","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Cylinders — update_cylinders","text":"","code":"update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Cylinders — update_cylinders","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Cylinders — update_cylinders","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update Cylinders — update_cylinders","text":"Updates verifies parent-child cylinder relationships calculates new variables metrics found throughout supported QSM software. function required run rest rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Update Cylinders — update_cylinders","text":"growth_parameter1rTwig growth_parameter2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update Cylinders — update_cylinders","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 32 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 29 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 33 variables: #> $ startX : num 0.763 0.77 0.77 0.763 0.764 ... #> $ startY : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.77 0.77 0.763 0.764 0.766 ... #> $ endY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axisY : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axisZ : num 0.98 0.991 0.959 0.992 0.973 ... #> $ extension_ID : int 2 3 4 5 6 7 8 9 10 11 ... #> $ radius_cyl : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ volume : num 0.000333 0.000155 0.000149 0.000141 0.000147 ... #> $ axis_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ segment_ID : int 44 44 44 44 44 44 44 44 44 44 ... #> $ node_ID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branching_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ cyl_ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent_ID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ UnmodRadius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ branch_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growthLength : num 34.2 34.2 34.2 34.1 34.1 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ distanceFromBase : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ distanceToTwig : num 3.44 3.38 3.36 3.33 3.3 ... #> $ reversePipeAreaBranchorder : int 121 121 121 121 121 121 121 121 121 121 ... #> $ reversePipeRadiusBranchorder: num 11 11 11 11 11 11 11 11 11 11 ... #> $ vesselVolume : num 416 409 406 403 400 ... #> - attr(*, \".internal.selfref\")="},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.2.0","text":"cluster_cloud(): New function transfer QSM variables input point cloud simulate point cloud QSM. Efficient nearest neighbor searching done C++ nanoflann library: https://github.com/jlblancoc/nanoflann prune_qsm(): new function efficiently easily prune QSMs using multiple pruning criteria return options. aRchi QSMs now supported package. Users can now pass radius color column variables either unquoted quoted user facing functions like plot_qsm(), qsm_summary(), export_mesh(). Piping QSM cylinders functions allows user easily select unquoted columns. update_cylinders(): Three new allometric scaling variables standard outputs - vessel_volume, pipe_area, pipe_radius. plot_qsm(): Point clouds stem triangulation meshes can now plotted independently QSM. triangulation: user can now plot TreeQSM triangulation meshes passing triangulation list import_qsm(). user can also control color palette tri_color tri_palette. pan: right mouse button now pans plot instead zooming default. functionality mimics pan3d() RGL, rewritten Rcpp better responsiveness. lit: Enable disable plot lighting alpha: Set cylinder transparency. Note: can degrade performance large numbers cylinders facets. axes_color: axes color can now set user. skeleton_lwd: Set line width skeleton plots. normalize: Center cylinders around 0,0,0. Defaults FALSE. correct_radii(): broken branch filter can now disabled, broken_branch = FALSE Now returns modified, index cylinders modified Real Twig. run_rtwig(): broken branch filter can now disabled, broken_branch = FALSE","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-2-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.2.0","text":"~ 2 - 3x performance improvement! outlier broken branch filters rewritten Rcpp, massive performance gains. Parallel processing removed, eliminating overhead excessive memory usage. update_cylinders(): Fix bug path metrics SimpleForest QSMs (issue #4). Refactored tidyeval. Fix bug triangulation using correct ending cylinder. box_dimension(): 3D plot now pans right mouse button. run_rtwig(): Fix missing Treegraph parameter (issue #5). Fix bug start x,y,z values incorrect. Fix bug NA cylinder orientation values cause calculations fail. NA values removed user sees warning promoting check QSM. QSM network now cached temp folder avoid repeat calculations. Data checking helpful error messages now included every function. Add Real Twig Method paper citation package readme. New website look. Update vignettes. Update twig data base. Reduced package dependencies.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.2.0","text":"qsm_summary(): User can pass radius either quoted unquoted column name, longer default value. Failing provide radius throw error prompting user radius column name. correct_radii(): parallel processing removed, backend longer parameter. run_rtwig():parallel processing removed, backend longer parameter. file changed filename run_rtwig(), import_qsm(), import_treegraph() consistent functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-110","dir":"Changelog","previous_headings":"","what":"rTwig 1.1.0","title":"rTwig 1.1.0","text":"CRAN release: 2024-08-20","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.1.0","text":"run_rtwig(): New function run Real Twig method calculate tree metrics one simple function. standardize_qsm(): New function standardize variable names across supported QSM software. See dictionary vignette details variable names. tree_metrics(): New function calculate standard outputs TreeQSM, plus new variables, metrics, simulated point clouds reconstructed entirely QSM. Computationally expensive tasks implemented Rcpp maximum performance. import_treegraph(): New function import Treegraph QSM. Treegraph support implemented throughout package! update_cylinders(): New variables: distanceFromBase, distanceToTwig, branch_alt. QSM topology now verified corrected topological errors. plot_qsm() Complete refactor Rcpp tidyeval massive performance improvements New QSM skeleton plotting option Supports plotting multiple QSMs plot Cylinder cloud colors can now set random bg_color can change background color plot export_mesh() Complete refactor Rcpp tidyeval massive performance improvements Cylinder color parameter can now set random, FALSE disable exporting colors Note: color exporting fixed future rgl package update","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-1-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.1.0","text":"Implement Rcpp across package plot_qsm() > 10x performance improvement! smooth_qsm() > 10x performance improvement! export_mesh() > 10x performance improvement! box_dimension() ~ 3x performance improvement update_cylinder() ~2x performance improvement better vectorization Cleaned variable names removed repeat calculations Verify correct QSM topology Reduced package dependencies Cleanup function imports Update twig data base Update vignettes Update citations","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.1.0","text":"parent child cylinder IDs, nodes, branches begin numbering 1 ensure compatibility R indexing igraph. affects SimpleForest Treegraph. Redefined SimpleForest branch structure begin new branch order end twig. ensures consistency code calculations TreeQSM, Treegraph, SimpleForest. old branch definition saved new variable called branch_alt, changed begin zero consistent new branch_alt variable Real Twig. Renamed twigRad function parameter twig_radius consistent tidy style guidelines Renamed GrowthLength growthLength consistent SimpleForest Variable names qsm_summary() updated explicit consistent outputs tree_metrics() plot_qsm() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. export_mesh() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. plot_stand() deprecated functionality now incorporated plot_qsm() twigs: renamed scientific.name scientific_name radius.mm radius_mm consistent naming conventions across package.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-102","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.2","title":"rTwig 1.0.2","text":"CRAN release: 2024-04-08 Reduced package size Allow user run examples Small text formatting changes Vignette webpage typo fixes Improved treedata import import_qsm()","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-101","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.1","title":"rTwig 1.0.1","text":"Initial CRAN Submission","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-100","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.0","title":"rTwig 1.0.0","text":"Initial release Real Twig!","code":""}] +[{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Box-Dimension","text":"Box dimension measure structural complexity object. grounded theoretical fractal analysis applied three-dimensional point cloud data. method uses box counting (appropriately voxel counting), relationship total number boxes needed contain point cloud box size structural complexity point cloud. Box dimension slope simple linear equation log number boxes, log inverse box size. larger R-squared value indicates self similarity point cloud. Box dimension ranges 1 (line) 3 (solid cube). box dimension 2.72 special object known Menger sponge, zero volume infinite surface area. individual trees box dimension 1 2.2. Box dimension sensitive resolution level occlusion point cloud. low resolution can lead oversimplification, much occlusion can lead boxes used contain cloud box size decreases. good quality point cloud low occlusion resolution 0-1 cm optimal calculating box dimension.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Box-Dimension","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Box-Dimension","text":"first step load rTwig package.","code":"library(rTwig)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-point-cloud","dir":"Articles","previous_headings":"","what":"Load Point Cloud","title":"Box-Dimension","text":"Now need load point cloud. Box dimension can run point cloud, single trees, entire forest stands. Let’s use example Kentucky coffee tree.","code":"file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"box-dimension","dir":"Articles","previous_headings":"","what":"Box Dimension","title":"Box-Dimension","text":"Now can calculate box dimension point cloud box_dimension function. need specify location x, y, z coordinates, defaults first three columns point cloud data frame. can also set lower cutoff, smallest box size. Since point cloud resolution 1 cm, set lowercutoff parameter 0.01 m, also default. Let’s take look summary data extract box dimension (slope).","code":"# Box Dimension Summary output <- box_dimension(cloud) str(output) #> List of 2 #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 9 obs. of 2 variables: #> ..$ log.box.size: num [1:9] 0 0.693 1.386 2.079 2.773 ... #> ..$ log.voxels : num [1:9] 1.1 1.95 3.09 4.11 5.18 ... #> ..- attr(*, \".internal.selfref\")= #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 1 obs. of 4 variables: #> ..$ r.squared : num 1 #> ..$ adj.r.squared: num 1 #> ..$ intercept : num 1.02 #> ..$ slope : num 1.48 # Box Dimension (slope) output[[2]]$slope #> [1] 1.483312"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Box-Dimension","text":"can also plot results 2D 3D plots, setting plot parameter 2D, 3D . plot parameter set FALSE default speed calculations.","code":"# 2D Plot output <- box_dimension(cloud, plot = \"2D\") # 3D Plot output <- box_dimension(cloud, plot = \"3D\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Dictionary","text":"Real Twig allows QSM variable names standardized across TreeQSM, SimpleForest, Treegraph, aRchi. done standardize_qsm() function, creates consistent experience working QSMs. detailed definitions variable names using rTwig QSM format.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"cylinder-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Cylinder Attributes","title":"Dictionary","text":"start: defines x, y, z coordinates center cylinder’s base. axis: defines x, y, z axis formed cylinder’s base top. end: defines x, y, z coordinates center cylinder’s top. id: first cylinder id 1 base tree. largest id value equal number rows data frame. parent: shows relationships individual cylinders QSM. parent first cylinder always zero, base tree parent. Within branch, parent cylinders always one less child. base branch, parent cylinder cylinder branch connected . radius: radius cylinder meters. raw_radius: radius cylinder possible modifications. using TreeQSM, always UnmodRadius column. using SimpleForest Treegraph, copy radius Real Twig run. Real Twig always uses radius corrections. modified: average index cylinder radius outlier modified Real Twig across QSM paths. value 0 indicates cylinder never modified path, value 1 indicates modified every path. value 0 1 modified , paths. length: length cylinder meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"branch-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Branch Attributes","title":"Dictionary","text":"branch: branch defined starting new branch order continuing twig reached. definition TreeQSM Treegraph use. SimpleForest branches converted definition standardizing QSM. first branch always main stem rTwig format. Treegraph QSMs retain definition branches. TreeQSM SimpleForest numbered consecutively order cylinder ids. branch_position: index cylinder’s position within branch. TreeQSM’s PositionInBranch definition. first position always base branch, last position always twig branch end case broken branch. branch_order: order every branch. smallest branch order zero always main stem. First order branches connected main stem, forth higher order branches. new branch order always begins new branching fork, continues twig end broken branch, one greater parent order. definition consistent TreeQSM, SimpleForest, Treegraph, rTwig format always defines main stem order zero consistency. reverse_order: reverse branch order (RBO). Traditional branch ordering relative main stem, tell us anything position size branch. Small twigs large branches can first order branches connected main stem traditional definition. RBO solves problem considering relative position branches within QSM. RBO assigns value one end twigs broken branches, works backwards base tree reached, assigned highest RBO. RBO branch maximum segment (internode) depth relative twigs tree. branch_alt: alternate branch index. Alternate branch zero always main stem. rest branches first order branches children. similar cutting first order branches saw labeling consecutively. using SimpleForest QSM, old branchID column updated main stem index zero.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"segment-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Segment Attributes","title":"Dictionary","text":"segment: segment (internode) portion tree branching forks (nodes). new segment begins every branch fork. Cylinders part segment cylinder one child new segment created. rTwig format always defines base tree first segment. parent_segment: shows relationships segments QSM. parent segment first segment always zero, first segment (base tree) parent segment. parent segment node current segment forked . total_children: total number cylinders supported given cylinder. useful find branches fork. value one means branching forks. value two means one branching fork, etc.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"additional-metrics","dir":"Articles","previous_headings":"Dictionary","what":"Additional Metrics","title":"Dictionary","text":"growth_length: growth length meters given cylinder. Growth length can defined sum lengths cylinders supported given cylinder. can visualize growth length cutting tree saw given point. cumulative length cut portion growth length part tree cut. growth length base tree sum lengths cylinders QSM. growth length twig simply length cylinder. Growth length reflects measurement taken real tree, easier obtain QSMs. base_distance: distance meters given cylinder base tree. distance calculated taking simplest complete path given cylinder base tree. twig_distance: average distance meters given cylinder away supported twigs. calculated finding complete simple paths given cylinder supported twigs, summing lengths, dividing number paths. vessel_volume: theoretical cumulative volume living vessels supported given cylinder based allometric scaling theory. sum pipe_area * length supported cylinders. pipe_area: theoretical cross-sectional area given cylinder based allometric scaling theory. units values total number supported twigs. pipe_radius: theoretical radius given cylinder based allometric scaling theory. units values square root total number supported twigs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Metrics","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr, tidyr, ggplot packages help data manipulation visualization, ggpubr multi-panel plots, rgl point cloud plotting.","code":"devtools::install_github(\"https://github.com/aidanmorales/rTwig\") # Load rTwig library(rTwig) # Other useful packages library(rgl) library(tidyr) library(dplyr) library(ggplot2) library(ggpubr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"run-real-twig-calculate-metrics","dir":"Articles","previous_headings":"","what":"Run Real Twig & Calculate Metrics","title":"Metrics","text":"Next, let’s run Real Twig run_rtwig() calculate tree metrics tree_metrics().","code":"# File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Run Real Twig cylinder <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) # Calculate detailed tree metrics metrics <- tree_metrics(cylinder)"},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"point-cloud","dir":"Articles","previous_headings":"Run Real Twig & Calculate Metrics","what":"Point Cloud","title":"Metrics","text":"can even plot simulated point cloud rgl library, look cylinder connectivity.","code":"plot_qsm(cylinder, qsm$cylinder, cloud = metrics$cloud, skeleton = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"plotting-code","dir":"Articles","previous_headings":"","what":"Plotting Code","title":"Metrics","text":"","code":"# Stem Taper ------------------------------------------------------------------- metrics$stem_taper %>% ggplot(aes(x = height_m, y = diameter_cm)) + geom_point() + stat_smooth(method = \"loess\", color = \"black\", formula = y ~ x) + theme_classic() + labs( title = \"Stem Taper\", x = \"Height (m)\", y = \"Diameter (cm)\" ) # Tree Metrics ----------------------------------------------------------------- # Tree Height Distributions metrics$tree_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Tree Diameter Distributions metrics$tree_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Tree Zenith Distributions metrics$tree_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Tree azimuth distributions metrics$tree_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + theme_classic() + facet_wrap(~type) + theme(legend.position = \"right\") # Branch Metrics --------------------------------------------------------------- # Branch diameter distributions metrics$branch_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Branch height distributions metrics$branch_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Branch angle distributions metrics$branch_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch zenith distributions metrics$branch_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch azimuth distributions metrics$branch_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch order distributions metrics$branch_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = branch_order, y = value, color = branch_order, fill = branch_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Order Distributions\", x = \"\", y = \"\", fill = \"Branch Order\", color = \"Branch Order\" ) + facet_wrap(~type) + # Segment Metrics -------------------------------------------------------------- # Segment diameter distributions metrics$segment_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Segment height distributions metrics$segment_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Segment angle distributions metrics$segment_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + # Segment zenith distributions metrics$segment_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment azimuth distributions metrics$segment_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment order distributions metrics$segment_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = reverse_order, y = value, color = reverse_order, fill = reverse_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Reverse Order Distributions\", x = \"\", y = \"\", fill = \"Reverse Order\", color = \"Reverse Order\" ) + facet_wrap(~type) + theme_classic() # Spreads ---------------------------------------------------------------------- spreads <- metrics$spreads # Generate colors from red to blue n <- length(unique(spreads$height_class)) colors <- data.frame(r = seq(0, 1, length.out = n), g = 0, b = seq(1, 0, length.out = n)) # Convert colors to hex color_hex <- apply(colors, 1, function(row) { rgb(row[1], row[2], row[3]) }) # Assign colors to height classes height_class_colors <- data.frame( height_class = unique(spreads$height_class), color = color_hex ) spreads %>% left_join(height_class_colors, by = \"height_class\") %>% ggplot(aes(x = azimuth_deg, y = spread_m, group = height_class, color = color)) + geom_line() + scale_color_identity() + coord_polar(start = 0) + labs(x = \"\", y = \"\") + theme_minimal() + theme(axis.text.y = element_blank()) # Vertical profile ------------------------------------------------------------- metrics$spreads %>% group_by(height_class) %>% summarise( max = max(spread_m), mean = mean(spread_m), min = min(spread_m) ) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes(x = height_class, y = value, color = type)) + geom_line() + labs( x = \"Height Class\", y = \"Spread (m)\", color = \"\" ) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Overview","text":"Real Twig designed tested using QSMs created TreeQSM modeling software. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume within ± 10% real tree volume. given QSM provides parent-child cylinder relationships, Real Twig work, case SimpleForest, Treegraph, aRchi software packages. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume across multiple different software packages. Real Twig can provide excellent tree volume estimates, can transform poor quality data good data. general rule thumb, closer QSM resembles actual tree correction, better results correction. Real Twig performs best topology tree correct, cylinder sizes main sources QSM error. Errors QSM topology become readily apparent correction, Real Twig can also used visually validate QSM topology without reference data.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Overview","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr package help data manipulation.","code":"# Load rTwig library(rTwig) # Other useful packages library(dplyr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"import-qsm","dir":"Articles","previous_headings":"","what":"Import QSM","title":"Overview","text":"rTwig supports available versions TreeQSM, v2.0 v2.4.1 time writing. important note legacy versions TreeQSM (v2.0) store data much different format modern versions (v2.3.0-2.4.1). strongly advised use latest version TreeQSM rTwig best QSM topology volume estimates. Older versions can used, QSM topology poor, volume underestimation almost guaranteed. Regardless version TreeQSM MATLAB used, import_qsm() function import QSM (.mat extension) convert data format usable R. user must specify version TreeQSM using version parameter. rTwig automatically defaults use new TreeQSM format, older format can imported version = \"2.0\". import_qsm() also imports QSM information, including cylinder, branch, treedata, rundata, pmdistance, triangulation data, stored together list. SimpleForest exports QSMs .csv files, easy load R using built read.csv() function. QSM contains thousands cylinders, much faster use fread() function data.table package take advantage multi-threaded support. Treegraph exports QSMs .json files. import R, can use import_treegraph() function quickly load Treegraph QSM. aRchi built R, provided function import data. Users can extract aRchi cylinder data aRchi::get_QSM() running rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-1-treeqsm-v2-3-0---2-4-1","dir":"Articles","previous_headings":"Import QSM","what":"Example 1: TreeQSM v2.3.0 - 2.4.1","title":"Overview","text":"can import QSM supplying import_qsm() function directory QSM. QSM list six elements. can check follows: Let’s check version TreeQSM used, date QSM made, take look cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Import and save QSM qsm <- import_qsm(file) summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list # QSM info qsm$rundata$version #> [1] \"2.4.1\" qsm$rundata$start.date #> [1] \"2023-12-06 10:14:31 UTC\" # Number of cylinders str(qsm$cylinder) #> 'data.frame': 1136 obs. of 17 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ parent : int 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 2 3 4 5 6 7 8 9 10 11 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: int 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-2-treeqsm-v2-0","dir":"Articles","previous_headings":"Import QSM","what":"Example 2: TreeQSM v2.0","title":"Overview","text":"Let’s try importing old QSM check structure.","code":"# QSM Directory file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") # Import and save QSM qsm2 <- import_qsm(file, version = \"2.0\") # QSM Info summary(qsm2) #> Length Class Mode #> cylinder 15 data.frame list #> treedata 33 -none- list str(qsm2$cylinder) #> 'data.frame': 1026 obs. of 15 variables: #> $ radius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ length : num 0.335 0.283 0.272 0.244 0.267 ... #> $ start.x : num 8.4 8.43 8.44 8.47 8.5 ... #> $ start.y : num 47.7 47.7 47.7 47.8 47.8 ... #> $ start.z : num 2.23 2.57 2.85 3.12 3.36 ... #> $ axis.x : num 0.1103 0.0531 0.0878 0.1666 0.0894 ... #> $ axis.y : num 0.0337 0.0296 0.1282 0.0801 0.061 ... #> $ axis.z : num 0.993 0.998 0.988 0.983 0.994 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : num 1 2 3 4 5 6 7 8 9 10 ... #> $ added : int 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ branch : num 1 1 1 1 1 1 1 1 1 1 ... #> $ BranchOrder : num 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: num 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-3-simpleforest","dir":"Articles","previous_headings":"Import QSM","what":"Example 3: SimpleForest","title":"Overview","text":"Let’s take look SimpleForest cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Import and save QSM cylinder data cylinder <- read.csv(file) str(cylinder) #> 'data.frame': 1149 obs. of 17 variables: #> $ ID : int 0 1 2 3 4 5 6 7 8 9 ... #> $ parentID : int -1 0 1 2 3 4 5 6 7 8 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance: num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parentSegmentID : int -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branchID : int 0 0 0 0 0 0 0 0 0 0 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"cylinder-data","dir":"Articles","previous_headings":"","what":"Cylinder Data","title":"Overview","text":"Next, update parent-child ordering cylinder data allow path analysis add new QSM variables. important QSM variable growth length. Growth length cumulative length metric, growth length cylinder length, plus lengths children. gives us perfect ordering along branch path, highest growth length equal base tree, twigs growth length equal cylinder length. also important note number twigs QSM always equal number paths QSM, since path goes base tree twig tip. also calculate several additional variables improve QSM analysis visualization. reverse branch order (RBO) assigns order 1 twigs, works backwards base main stem, highest RBO. RBO essentially maximum node depth given branch segment (area branching forks). RBO problematic twig cylinders easy identify. distance cylinder base, average distance cylinder supported twigs new ways help visualize problematic cylinders. Let’s save cylinders new variable make easier work update ordering.","code":"# Save cylinders to new object cylinder <- qsm$cylinder # Update cylinder data cylinder <- update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"topology","dir":"Articles","previous_headings":"","what":"Topology","title":"Overview","text":"correct QSM, often worthwhile check quality QSM plotting input point cloud. , load point cloud save data frame, first three columns x, y, z columns. use plot_qsm() function . want check raw cylinder fits possible modification, use raw cylinder radii.","code":"# Load the input point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) # Plot the qsm and point cloud plot_qsm(cylinder = cylinder, cloud = cloud, radius = \"UnmodRadius\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"twig-diameters","dir":"Articles","previous_headings":"","what":"Twig Diameters","title":"Overview","text":"can correct QSM radii, need know real twig diameter . example tree, species Kentucky coffee tree (Gymnocladus dioicus), nice, stout twigs. rTwig comes data base twigs can called typing twigs data set. data set includes average twig radius, min max radius, standard deviation, coefficient variation. Let’s look twig data set find twig diameter Kentucky coffee tree.","code":"# Look at the twigs database twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows # Find our species filter(twigs, scientific_name == \"Gymnocladus dioicus\") #> # A tibble: 1 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Gymnocladus dioicus 4.23 30 2.79 6.6 0.87 0.2"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"summary-metrics","dir":"Articles","previous_headings":"","what":"Summary Metrics","title":"Overview","text":"correct QSM, Let’s take look current metrics, can compare tree volume correction. can qsm_summary() function. stem triangulation enabled TreeQSM, can use better represent main stem volume cases, especially large buttress flares. can also make plot radius versus growth length see much overestimation twig radii. Looking diagnostic plot log log scale, measured twig radius horizontal line, can see nearly twig radii overestimated, increasing radii variation growth length approaches zero. Except main stem, clear pattern individual branch tapering.","code":"# QSM summary qsm_summary(cylinder = cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.644 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 # QSM summary with Triangulation qsm_summary(cylinder = cylinder, radius = radius, triangulation = qsm$triangulation)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"correct-radii","dir":"Articles","previous_headings":"","what":"Correct Radii","title":"Overview","text":"Now can correct QSM cylinder radii correct_radii() function. step, model path tree separately, poorly fit cylinders identified removed, GAM fit, intercept measured twig radius, growth length predicts cylinder radius. Let’s correct cylinder radii Kentucky coffee tree look new volume estimates diagnostic plots. can see reduced volume QSM around 3 liters, around 15% overestimation volume correction. Kentucky coffee tree relatively large twigs, overestimation severe tree much smaller twigs, can upwards >200% overestimation cases. Looking diagnostic plot, can see individual branches can clearly identified unique allometry. Notice nearly volume reduction occurred higher order branches, main stem remaining nearly unchanged. branches now taper towards measured twig radius Kentucky coffee tree. Getting real twig diameter critical, high value overestimate volume, low value underestimate total volume, underestimate proportional number twigs small branches tree. species available database, found genus level twig radius average good substitute.","code":"# Correct cylinder radii cylinder <- correct_radii(cylinder, twig_radius = 4.23) # Corrected QSM summary qsm_summary(cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.640 #> 2 1 5.20 0.754 #> 3 2 2.69 0.583 #> 4 3 0.539 0.170 #> 5 4 0.104 0.0431 #> 6 5 0.00683 0.00308"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Overview","text":"Optionally, can smooth QSM ensuring cylinders connected. visual change affect volume estimates. can smooth_qsm() function, plot results plot_qsm() function. different colors different branch orders. can also color QSM many different variables palettes. See plot_qsm() documentation details. can also save QSM mesh (.ply extension) use modeling programs export_mesh() function. colors palettes found plot_qsm() function can used color mesh.","code":"# Smooth QSM cylinder <- smooth_qsm(cylinder) # Plot QSM plot_qsm(cylinder) # QSM Custom Colors & Piping cylinder %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"magma\" ) # Plot Twigs Colored by Unique Segment cylinder %>% filter(reverseBranchOrder == 1) %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"rainbow\" ) # Export Mesh Colored by RBO cylinder %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"magma\" ) # Export Twigs Colored by Unique Segments cylinder %>% filter(reverseBranchOrder == 1) %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"rainbow\" )"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"workflow-best-practices","dir":"Articles","previous_headings":"","what":"Workflow & Best Practices","title":"Overview","text":"overview typical rTwig processing chain. dealing multiple trees, advise creating master data frame tidy format, unique tree row, columns tree id, directory QSM .mat file, species twig diameter, can tailored workflow needs. simple matter looping master data frame, correcting tree, saving results master list. Make sure read function’s documentation examples unique features.","code":"# Import QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Real Twig Main Steps cylinder <- run_rtwig(file, twig_radius = 4.23) # Tree Metrics metrics <- tree_metrics(cylinder) # Plot Results plot_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Twigs","text":"Twigs smallest ground woody component tree. Twigs responsible supporting delicate tissues needed grow leaves protect buds dormant season. twig measurements basis Real Twig method, publicly available databases twigs limited, present database twig measurements wide range tree genera species.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Twigs","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Twigs","text":"first step load rTwig package.","code":"library(rTwig) #> Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display #> Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. # Useful packages library(dplyr) library(ggplot2)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"twig-database","dir":"Articles","previous_headings":"","what":"Twig Database","title":"Twigs","text":"twig database built directly rTwig can called follows: database broken 7 different columns. scientific_name specific epithet. Genus spp. average species genus. radius_mm twig radius millimeters. species, n number unique twig samples taken, min minimum twig radius, max max twig radius, std standard deviation, cv coefficient variation. Let’s see breakdown species.","code":"# If the rTwig library has been loaded twigs # If rTwig hasn't been loaded, but just the twigs are needed rTwig::twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows unique(twigs$scientific_name) #> [1] \"Abies concolor\" \"Abies spp.\" #> [3] \"Acer platanoides\" \"Acer rubrum\" #> [5] \"Acer saccharinum\" \"Acer saccharum\" #> [7] \"Acer spp.\" \"Aesculus flava\" #> [9] \"Aesculus spp.\" \"Betula nigra\" #> [11] \"Betula spp.\" \"Carya cordiformis\" #> [13] \"Carya ovata\" \"Carya spp.\" #> [15] \"Castanea dentata\" \"Castanea spp.\" #> [17] \"Cercis canadensis\" \"Cercis spp.\" #> [19] \"Cladrastis kentukea\" \"Cladrastis spp.\" #> [21] \"Cornus mas\" \"Cornus officinalis\" #> [23] \"Cornus spp.\" \"Crataegus spp.\" #> [25] \"Fagus grandifolia\" \"Fagus spp.\" #> [27] \"Fagus sylvatica\" \"Fraxinus americana\" #> [29] \"Fraxinus pennsylvanica\" \"Fraxinus quadrangulata\" #> [31] \"Fraxinus spp.\" \"Ginkgo biloba\" #> [33] \"Ginkgo spp.\" \"Gleditsia spp.\" #> [35] \"Gleditsia triacanthos\" \"Gymnocladus dioicus\" #> [37] \"Gymnocladus spp.\" \"Gymnopodium floribundum\" #> [39] \"Gymnopodium spp.\" \"Juglans cinerea\" #> [41] \"Juglans nigra\" \"Juglans spp.\" #> [43] \"Laguncularia racemosa\" \"Laguncularia spp.\" #> [45] \"Larix laricina\" \"Larix spp.\" #> [47] \"Liquidambar spp.\" \"Liquidambar styraciflua\" #> [49] \"Liriodendron spp.\" \"Liriodendron tulipifera\" #> [51] \"Magnolia acuminata\" \"Magnolia spp.\" #> [53] \"Malus spp.\" \"Metasequoia glyptostroboides\" #> [55] \"Metasequoia spp.\" \"Nyssa spp.\" #> [57] \"Nyssa sylvatica\" \"Ostrya spp.\" #> [59] \"Ostrya virginiana\" \"Phellodendron amurense\" #> [61] \"Phellodendron spp.\" \"Picea abies\" #> [63] \"Picea omorika\" \"Picea pungens\" #> [65] \"Picea spp.\" \"Pinus nigra\" #> [67] \"Pinus spp.\" \"Pinus strobus\" #> [69] \"Platanus acerifolia\" \"Platanus occidentalis\" #> [71] \"Platanus spp.\" \"Populus deltoides\" #> [73] \"Populus spp.\" \"Prunus serotina\" #> [75] \"Prunus spp.\" \"Prunus virginiana\" #> [77] \"Quercus acutissima\" \"Quercus alba\" #> [79] \"Quercus bicolor\" \"Quercus coccinea\" #> [81] \"Quercus ellipsoidalis\" \"Quercus imbricaria\" #> [83] \"Quercus macrocarpa\" \"Quercus michauxii\" #> [85] \"Quercus muehlenbergii\" \"Quercus palustris\" #> [87] \"Quercus robur\" \"Quercus rubra\" #> [89] \"Quercus shumardii\" \"Quercus spp.\" #> [91] \"Quercus velutina\" \"Rhizophora mangle\" #> [93] \"Rhizophora spp.\" \"Thuja occidentalis\" #> [95] \"Thuja spp.\" \"Tilia americana\" #> [97] \"Tilia spp.\" \"Tilia tomentosa\" #> [99] \"Tsuga canadensis\" \"Tsuga spp.\" #> [101] \"Ulmus americana\" \"Ulmus pumila\" #> [103] \"Ulmus rubra\" \"Ulmus spp.\""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Twigs","text":"Let’s visualize twig data!","code":"# Lets look at a subset of oak species twigs %>% filter(grepl(\"Quercus\", scientific_name)) %>% ggplot(aes(x = scientific_name, y = radius_mm, color = scientific_name)) + geom_point(aes(size = n)) + geom_errorbar(aes(ymax = max, ymin = min)) + coord_flip() + labs( title = \"Quercus Twig Radii\", x = \"\", y = \"Twig Radius (mm)\", color = \"Species\", size = \"Sample Size\" ) + scale_x_discrete(limits = rev) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-4-1","dir":"Articles","previous_headings":"","what":"TreeQSM v2.4.1","title":"Validation","text":"mass estimates statistics using TreeQSM v2.4.1 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-3-0","dir":"Articles","previous_headings":"","what":"TreeQSM v2.3.0","title":"Validation","text":"mass estimates statistics using TreeQSM v2.3.0 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"simpleforest","dir":"Articles","previous_headings":"","what":"SimpleForest","title":"Validation","text":"important note Real Twig tested SimpleForest development. Real Twig improve volume estimates SimpleForest versus built allometric corrections, still improvements made, SimpleForest QSM cylinders generally much overestimated TreeQSM cylinders, making identification “good” cylinders difficult. mass estimates statistics using SimpleForest v5.3.2 built vessel volume correction, Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Aidan Morales. Author, maintainer, copyright holder. David W. MacFarlane. Author, copyright holder.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Morales , MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. R package version 1.2.0, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. Morales , MacFarlane D (2024). “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 1-16. doi:10.1093/forestry/cpae046.","code":"@Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, note = {R package version 1.2.0, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, } @Article{, title = {Reducing tree volume overestimation in quantitative structure models using modeled branch topology and direct twig measurements}, author = {Aidan Morales and David W. MacFarlane}, journal = {Forestry: An International Journal of Forest Research}, year = {2024}, pages = {1-16}, doi = {https://doi.org/10.1093/forestry/cpae046}, }"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Realistic Quantitative Structure Models","text":"Real Twig method correct unrealistic cylinders quantitative structure models (QSMs), different traditional allometric statistical corrections. Small branch twig cylinders overestimated QSMs due technical limitations current LiDAR sensor technology. Real Twig overcomes limitations using real direct twig diameter measurements corresponding tree species inform individual path taper models QSM. Real Twig dynamically identifies realistic cylinders QSM using network analysis, general additive models, direct twig measurements, model correct unrealistic cylinders high degree precision accuracy vetted ground truth reference data. Real Twig method presented R package, rTwig. rTwig includes novel database twig diameter measurements many common North American European trees, make method immediately accessible user. addition, rTwig includes fast efficient tools QSM visualization analysis seamlessly compatible R ecosystem, point cloud fractal analysis visualization using box-dimension metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"method","dir":"","previous_headings":"","what":"Method","title":"Realistic Quantitative Structure Models","text":"complete description validation Real Twig can read : Aidan Morales, David W. MacFarlane. “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 2024, pp. 1-16. https://doi.org/10.1093/forestry/cpae046.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"realistic-trees","dir":"","previous_headings":"Features","what":"Realistic Trees","title":"Realistic Quantitative Structure Models","text":"main goal Real Twig correct volume overestimation QSMs caused limitations LiDAR sensors better non-destructive ground biomass (AGB) estimates. Real Twig incorporates direct twig measurement QSM, resulting models accurate volume metrics, also visually realistic, independent tree species size. example, shown 300+ year old white oak tree (Quercus alba), without Real Twig.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"efficient-visualization","dir":"","previous_headings":"Features","what":"Efficient Visualization","title":"Realistic Quantitative Structure Models","text":"plot_qsm() can plot QSMs point clouds, using rgl 3D display, C++ via Rcpp efficiently build cylinders. cylinders, simulated point cloud, skeleton can plotted colored variable user supplied color palette. can also visualize stem triangulation meshes TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"detailed-tree-metrics","dir":"","previous_headings":"Features","what":"Detailed Tree Metrics","title":"Realistic Quantitative Structure Models","text":"goal rTwig provide users tools visualize analyze QSM metrics without tied particular QSM software. end, standardize_qsm() provides consistent naming convention supported QSMs, making easy combine analyze QSMs different sources. tree_metrics() calculates major QSM metrics supported software. prune_qsm() can virtually prune tree using multiple input parameters. cluster_cloud() can transfer QSM metrics directly onto unorganized point cloud, simulate virtual point cloud. See vignettes function reference pages details.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"supported-software","dir":"","previous_headings":"Features","what":"Supported Software","title":"Realistic Quantitative Structure Models","text":"rTwig currently supports TreeQSM, SimpleForest, Treegraph, aRchi","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"functions","dir":"","previous_headings":"","what":"Functions","title":"Realistic Quantitative Structure Models","text":"run_rtwig() runs Real Twig method QSM import_qsm() imports QSM created TreeQSM (.mat) import_treegraph() imports QSM created Treegraph (.json) standardize_qsm() standardizes QSM variable names across supported software update_cylinders() updates cylinder relationships adds new QSM variables correct_radii models QSM paths corrects cylinder radii tree_metrics() generates detailed tree metrics simulated point cloud cluster_cloud() transfers QSM variables point cloud simulates point cloud qsm_summary() summarises QSM diameter, height, volume, surface area smooth_qsm() connects cylinder end--end smooth branch visualization plot_qsm() plots QSMs optionally point clouds prune_qsm() prunes QSM cylinder attributes, height, diameter classes export_mesh() exports QSM mesh object (.ply) export_mat() exports QSM MATLAB format (.mat) box_dimension() calculates visualizes structural complexity point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Realistic Quantitative Structure Models","text":"can install released version rTwig CRAN : can install development version rTwig GitHub :","code":"install.packages(\"rTwig\") # install.packages(\"devtools\") devtools::install_github(\"aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-real-twig","dir":"","previous_headings":"Installation","what":"Quick Start: Real Twig","title":"Realistic Quantitative Structure Models","text":"examples quickly run visualize Real Twig, using example data package. See vignettes details general workflow best practices.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treeqsm","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"TreeQSM","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"simpleforest","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"SimpleForest","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treegraph","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"Treegraph","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- \"path_to_treegraph_json\" # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"archi","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"aRchi","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-fractal-analysis","dir":"","previous_headings":"Installation","what":"Quick Start: Fractal Analysis","title":"Realistic Quantitative Structure Models","text":"rTwig also includes efficient function written C++ via Rcpp fractal analysis using voxel-counting method. example quickly calculate box-dimension point cloud using example data package. See vignette details explanation.","code":"# Load a point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file) # Calculate box-dimension output <- box_dimension(cloud) output[[2]]$slope"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":null,"dir":"Reference","previous_headings":"","what":"Box Dimension — box_dimension","title":"Box Dimension — box_dimension","text":"R port Dominik Seidel's fractal analysis \"box-dimension\" metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box Dimension — box_dimension","text":"","code":"box_dimension(cloud, lowercutoff = 0.01, rm_int_box = FALSE, plot = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box Dimension — box_dimension","text":"cloud point cloud matrix size n x 3. Non-matrices automatically converted matrix. lowercutoff smallest box size determined point spacing cloud meters. Defaults 1 cm. rm_int_box Remove initial box TRUE FALSE. Defaults FALSE. plot Plot results. user can specify \"2D\", \"3D\", \"\" plots. FALSE disables plotting. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box Dimension — box_dimension","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box Dimension — box_dimension","text":"box_dimension1rTwig box_dimension2rTwig box_dimension3rTwig box_dimension4rTwig box_dimension5rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box Dimension — box_dimension","text":"","code":"## Calculate Box Dimension file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) output <- box_dimension(cloud, plot = \"ALL\") #> Panning plot on rgl device: 1 output #> [[1]] #> # A tidytable: 9 × 2 #> log.box.size log.voxels #> #> 1 0 1.10 #> 2 0.693 1.95 #> 3 1.39 3.09 #> 4 2.08 4.11 #> 5 2.77 5.18 #> 6 3.47 6.14 #> 7 4.16 7.16 #> 8 4.85 8.23 #> 9 5.55 9.27 #> #> [[2]] #> # A tidytable: 1 × 4 #> r.squared adj.r.squared intercept slope #> #> 1 1.00 1.00 1.02 1.48 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster Cloud — cluster_cloud","title":"Cluster Cloud — cluster_cloud","text":"Cluster point cloud simulate point cloud based QSM. using input point cloud, cylinder ids transferred cloud using nearest neighbors. simulating cloud, points built directly cylinders user controlled spacing. cylinder id can used easily join desired variables QSM cloud. nearest neighbor search uses C++ nanoflann library.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster Cloud — cluster_cloud","text":"","code":"cluster_cloud(cylinder, cloud = NULL, spacing = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster Cloud — cluster_cloud","text":"cylinder QSM cylinder data frame. cloud input point cloud QSM cluster. NULL (default), simulated cloud returned. spacing point spacing meters simulated cloud. Defaults 0.02 meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster Cloud — cluster_cloud","text":"point cloud data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cluster Cloud — cluster_cloud","text":"blanco2014nanoflannrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster Cloud — cluster_cloud","text":"","code":"## Load Data file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") file2 <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii cloud <- read.table(file2) ## Clustered Cloud clustered_cloud <- cluster_cloud(cylinder = qsm, cloud = cloud) #> Clustering Point Cloud # # Join QSM variables and export # filename <- tempfile(pattern = \"clustered_cloud\", fileext = \".txt\") # clustered_cloud %>% # left_join(qsm) %>% # fwrite(file = filename) ## Simulated Cloud simulated_cloud <- cluster_cloud(cylinder = qsm, spacing = 0.01) #> Simulating Point Cloud # Plot Simulated Cloud plot_qsm(cloud = simulated_cloud) #> Plotting Cloud #> Panning plot on rgl device: 1 # # Join QSM variables and export # filename2 <- tempfile(pattern = \"simulated_cloud\", fileext = \".txt\") # simulated_cloud %>% # left_join(qsm) %>% # fwrite(file = filename2)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":null,"dir":"Reference","previous_headings":"","what":"Correct Radii — correct_radii","title":"Correct Radii — correct_radii","text":"Corrects cylinder radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correct Radii — correct_radii","text":"","code":"correct_radii(cylinder, twig_radius, broken_branch = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correct Radii — correct_radii","text":"cylinder QSM cylinder data frame twig_radius Twig radius millimeters broken_branch Enable disable broken branch filter. Defaults enabled (TRUE).","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correct Radii — correct_radii","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Correct Radii — correct_radii","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 30 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Export MAT — export_mat","title":"Export MAT — export_mat","text":"Exports cylinder data visualized TreeQSM's plot_cylinder_model() function","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export MAT — export_mat","text":"","code":"export_mat(cylinder, filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export MAT — export_mat","text":"cylinder QSM cylinder data frame filename Desired name file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export MAT — export_mat","text":"Returns .mat file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export MAT — export_mat","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":null,"dir":"Reference","previous_headings":"","what":"Export Mesh — export_mesh","title":"Export Mesh — export_mesh","text":"Exports QSM cylinder mesh using rgl library","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export Mesh — export_mesh","text":"","code":"export_mesh( cylinder, filename, radius = NULL, color = NULL, palette = NULL, facets = 6, normals = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export Mesh — export_mesh","text":"cylinder QSM cylinder data frame filename File name path exporting. .ply extension automatically added present. radius Radius column name either quoted unquoted. Defaults modified cylinders cylinder data frame. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. normals Option export normals. Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export Mesh — export_mesh","text":"mesh .ply file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export Mesh — export_mesh","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Import TreeQSM — import_qsm","title":"Import TreeQSM — import_qsm","text":"Imports QSM created TreeQSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import TreeQSM — import_qsm","text":"","code":"import_qsm(filename, version = \"2.x.x\")"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import TreeQSM — import_qsm","text":"filename TreeQSM .mat MATLAB file version TreeQSM version. Defaults 2.x.x. user can also specify 2.0 format.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import TreeQSM — import_qsm","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import TreeQSM — import_qsm","text":"TreeQSMrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import TreeQSM — import_qsm","text":"","code":"## Read a TreeQSM MATLAB file in the 2.3.x - 2.4.x format file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.x.x\") #> Importing TreeQSM summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list ## Read a TreeQSM MATLAB file in the 2.0 format file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.0\") #> Importing TreeQSM names(qsm) #> [1] \"cylinder\" \"treedata\""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Treegraph — import_treegraph","title":"Import Treegraph — import_treegraph","text":"Imports QSM created treegraph","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Treegraph — import_treegraph","text":"","code":"import_treegraph(filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Treegraph — import_treegraph","text":"filename treegraph .json file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Treegraph — import_treegraph","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import Treegraph — import_treegraph","text":"treegraph2rTwig treegraph1rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import Treegraph — import_treegraph","text":"","code":"if (FALSE) { # \\dontrun{ # Import a treegraph QSM qsm <- import_treegraph(\"path/to/json/file\") } # }"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot QSM — plot_qsm","title":"Plot QSM — plot_qsm","text":"Efficiently plot QSMs point clouds. Uses Rcpp RGL libraries backends.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot QSM — plot_qsm","text":"","code":"plot_qsm( cylinder = NULL, radius = NULL, color = NULL, palette = NULL, alpha = 1, facets = 6, skeleton = FALSE, skeleton_lwd = NULL, cloud = NULL, pt_color = NULL, pt_size = NULL, triangulation = NULL, tri_color = NULL, tri_palette = NULL, axes = TRUE, axes_color = NULL, grid = FALSE, grid_color = NULL, hover = FALSE, bg_color = NULL, lit = TRUE, pan = TRUE, normalize = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot QSM — plot_qsm","text":"cylinder QSM cylinder data frame. radius Radius column name either quoted unquoted. Defaults modified radii. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. alpha Set transparency cylinders. Defaults 1. 1 opaque 0 fully transparent. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. skeleton Plot QSM skeleton instead cylinders. Defaults FALSE. skeleton_lwd Skeleton line width. Defaults 1. cloud Point cloud data frame first three columns x, y, z coordinates coordinate system QSM. Defaults NULL. pt_color Color point cloud. Accepts hex colors, grDevices::colors(), \"random\". Defaults black. pt_size Size points. Defaults 0.1. triangulation Plot stem triangulation mesh TreeQSM. Defaults NULL. tri_color Color triangulation mesh. Colors must single hex color. tri_palette Optional triangulation color palette z values. Supports inputs palettes. axes Show plot axes. Defaults TRUE. axes_color Set axes color. Defaults black. grid Show plot grid lines. Defaults FALSE. grid_color Set grid lines color. Defaults grey. hover Show cylinder branch id mouse hover. Defaults FALSE. bg_color Set background color plot. Accepts hex colors grDevices::colors(). Defaults white. lit Enable light source plot. Defaults TRUE. Can set FALSE. pan Use right mouse button pan plot. Defaults TRUE, disabled hover enabled. normalize Normalize QSM 0,0,0 based provided data. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot QSM — plot_qsm","text":"rgl plot","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot QSM — plot_qsm","text":"","code":"## TreeQSM Processing Chain & Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 triangulation <- qsm$triangulation plot_qsm(triangulation = triangulation) #> Plotting Triangulation #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Prune QSM — prune_qsm","title":"Prune QSM — prune_qsm","text":"Efficiently prune QSM. user can prune cylinder, branch, segment ids, height diameter classes, individually, time, return either pruned data, remaining data, binary index cylinders pruned.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prune QSM — prune_qsm","text":"","code":"prune_qsm( cylinder, cylinder_ids = NULL, branch_ids = NULL, segment_ids = NULL, height_m = NULL, diameter_cm = NULL, invert = FALSE, index = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prune QSM — prune_qsm","text":"cylinder QSM cylinder data frame cylinder_ids single vector cylinder ids. Everything connected cylinder pruned. branch_ids single vector branch ids. Everything connected branch pruned. segment_ids single vector segment ids. Everything connected segment pruned. height_m Height class meters cylinders pruned. Valid inputs numeric one decimal. diameter_cm Branch diameter class centimeters cylinders pruned. Valid inputs numeric one decimal. invert Return remaining pruned data. Defaults TRUE (remaining data), can set FALSE. index Returns column index called pruning indicating cylinder pruned (1) un-pruned (0). Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prune QSM — prune_qsm","text":"data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prune QSM — prune_qsm","text":"","code":"## Load QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Pruning Index prune1 <- prune_qsm(cylinder, height_m = 2, index = TRUE) #> Pruning QSM plot_qsm(prune1, color = pruning, palette = \"blue2red\") #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Remaining prune2 <- prune_qsm(cylinder, height_m = 2, invert = FALSE) #> Pruning QSM plot_qsm(prune2) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Pruned prune3 <- prune_qsm(cylinder, height_m = 2, invert = TRUE) #> Pruning QSM plot_qsm(prune3) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"QSM Summary — qsm_summary","title":"QSM Summary — qsm_summary","text":"Generates simple QSM summary (e.g. volume, surface area, dbh, etc.) totals branch order.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"QSM Summary — qsm_summary","text":"","code":"qsm_summary(cylinder, radius, triangulation = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"QSM Summary — qsm_summary","text":"cylinder QSM cylinder data frame radius Radius column name either quoted unquoted. triangulation QSM triangulation list. Defaults NULL. supports TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"QSM Summary — qsm_summary","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"QSM Summary — qsm_summary","text":"","code":"## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics qsm_summary(cylinder, radius) #> Creating QSM Summary #> [[1]] #> # A tidytable: 5 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 12.9 0.768 #> 2 1 8.70 1.07 #> 3 2 6.46 0.871 #> 4 3 1.82 0.298 #> 5 4 0.0723 0.0148 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.39 3.67 12.9 17.1 30.0 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #> # TreeQSM Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics qsm_summary(cylinder, radius, triangulation = qsm$triangulation) #> Creating QSM Summary #> [[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.18 3.69 28.7 11.4 40.1 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rTwig: Realistic Quantitative Structure Models — rTwig-package","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Real Twig method correct branch overestimation quantitative structure models. Overestimated cylinders correctly tapered using measured twig diameters corresponding tree species. Supported quantitative structure modeling software includes 'TreeQSM', 'SimpleForest', 'Treegraph', 'aRchi'. Also included novel database twig diameters tools fractal analysis point clouds.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Maintainer: Aidan Morales moral169@msu.edu (ORCID) [copyright holder] Authors: David W. MacFarlane macfar24@msu.edu [copyright holder]","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Real Twig — run_rtwig","title":"Run Real Twig — run_rtwig","text":"Runs Real Twig steps","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Real Twig — run_rtwig","text":"","code":"run_rtwig( filename, twig_radius, metrics = TRUE, version = NULL, smooth = TRUE, standardize = FALSE, broken_branch = TRUE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Real Twig — run_rtwig","text":"filename file path QSM (.mat, .csv, .json) twig_radius Twig radius millimeters metrics Calculate tree metrics? Defaults TRUE. version Defaults NULL. using specific version TreeQSM, user can specify version (e.g. 2.4.1, 2.0, etc.). smooth Defaults TRUE, using TreeQSM. Can set FALSE. standardize Standardize QSM cylinder data? Defaults FALSE. Can set TRUE. broken_branch Enable disable broken branch filter. Defaults TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Real Twig — run_rtwig","text":"Returns cylinder data frame list metrics true.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Real Twig — run_rtwig","text":"","code":"## TreeQSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics str(qsm$cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.769 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.009949 -0.022059 0.016224 -0.000391 0.012068 ... #> $ axis.y : num 0.091165 0.019722 0.034392 -0.000295 0.023483 ... #> $ axis.z : num 0.996 1 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth QSM — smooth_qsm","title":"Smooth QSM — smooth_qsm","text":"Visual smoothing QSM ensuring midpoints cylinders connected","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth QSM — smooth_qsm","text":"","code":"smooth_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth QSM — smooth_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth QSM — smooth_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth QSM — smooth_qsm","text":"","code":"file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Before Smoothing plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## After Smoothing cylinder <- smooth_qsm(cylinder) #> Smoothing QSM plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize QSM — standardize_qsm","title":"Standardize QSM — standardize_qsm","text":"Standardizes QSM variable names ordering across different QSM software","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize QSM — standardize_qsm","text":"","code":"standardize_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize QSM — standardize_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize QSM — standardize_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize QSM — standardize_qsm","text":"Renames supported QSM software output columns consistent. names lower case underscore delimited. See dictionary vignette detailed description column names. consistent QSM format ensures maximum compatibility analyzing QSMs made different software. function can run either update_cylinders function run, stage.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize QSM — standardize_qsm","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 28 variables: #> $ start_x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis_y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis_z : num 0.996 0.999 0.999 1 1 ... #> $ end_x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ raw_radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 32.8 32.7 32.6 32.6 32.6 ... #> $ base_distance : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ twig_distance : num 3.4 3.31 3.24 3.17 3.16 ... #> $ vessel_volume : num 279 271 266 260 259 ... #> $ pipe_area : int 82 82 82 82 82 82 82 82 82 82 ... #> $ pipe_radius : num 9.06 9.06 9.06 9.06 9.06 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 28 variables: #> $ start_x : num 0.761 0.759 0.771 0.768 0.765 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axis_y : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axis_z : num 0.996 0.963 0.998 0.999 0.998 ... #> $ end_x : num 0.759 0.771 0.768 0.765 0.769 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ raw_radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : num 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 31.4 31.4 31.3 31.3 31.2 ... #> $ base_distance : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ twig_distance : num 3.43 3.38 3.33 3.27 3.22 ... #> $ vessel_volume : num 237 233 229 226 222 ... #> $ pipe_area : int 69 69 69 69 69 69 69 69 69 69 ... #> $ pipe_radius : num 8.31 8.31 8.31 8.31 8.31 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 28 variables: #> $ start_x : num 0.763 0.77 0.77 0.763 0.764 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axis_y : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axis_z : num 0.98 0.991 0.959 0.992 0.973 ... #> $ end_x : num 0.77 0.77 0.763 0.764 0.766 ... #> $ end_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ raw_radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 34.2 34.2 34.2 34.1 34.1 ... #> $ base_distance : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ twig_distance : num 3.44 3.38 3.36 3.33 3.3 ... #> $ vessel_volume : num 416 409 406 403 400 ... #> $ pipe_area : int 121 121 121 121 121 121 121 121 121 121 ... #> $ pipe_radius : num 11 11 11 11 11 11 11 11 11 11 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Tree Metrics — tree_metrics","title":"Tree Metrics — tree_metrics","text":"Calculates tree metrics QSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tree Metrics — tree_metrics","text":"","code":"tree_metrics(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tree Metrics — tree_metrics","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tree Metrics — tree_metrics","text":"Returns list tree metric data frames synthetic point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tree Metrics — tree_metrics","text":"Calculates detailed tree, branch, segment metrics QSM. outputs include standard outputs TreeQSM, also additional variables, including, limited , growth length, reverse branch order, branch segment node relationships, distances twigs base tree, across various distribution metrics. Also included simulated point cloud tree, based QSM cylinder radii. corrected Real Twig, allow testing validation point cloud diameter overestimation throughout tree.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tree Metrics — tree_metrics","text":"TreeQSMrTwig growth_parameter1rTwig growth_parameter2rTwig treegraph2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tree Metrics — tree_metrics","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") cylinder <- import_qsm(file)$cylinder #> Importing TreeQSM cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\" ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":null,"dir":"Reference","previous_headings":"","what":"Twig Database — twigs","title":"Twig Database — twigs","text":"Database twig radii common North American tree species","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Twig Database — twigs","text":"","code":"twigs"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"twigs","dir":"Reference","previous_headings":"","what":"twigs","title":"Twig Database — twigs","text":"data frame containing twig radii measurements scientific_name tree's genus species radius_mm average twig radius millimeters n twig measurement sample size min minimum twig radii samples max maximum twig radii samples std standard deviation twig radii cv coefficient variation twig radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Cylinders — update_cylinders","title":"Update Cylinders — update_cylinders","text":"Updates QSM cylinder data preparation radii correction","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Cylinders — update_cylinders","text":"","code":"update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Cylinders — update_cylinders","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Cylinders — update_cylinders","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update Cylinders — update_cylinders","text":"Updates verifies parent-child cylinder relationships calculates new variables metrics found throughout supported QSM software. function required run rest rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Update Cylinders — update_cylinders","text":"growth_parameter1rTwig growth_parameter2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update Cylinders — update_cylinders","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 32 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 29 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 33 variables: #> $ startX : num 0.763 0.77 0.77 0.763 0.764 ... #> $ startY : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.77 0.77 0.763 0.764 0.766 ... #> $ endY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axisY : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axisZ : num 0.98 0.991 0.959 0.992 0.973 ... #> $ extension_ID : int 2 3 4 5 6 7 8 9 10 11 ... #> $ radius_cyl : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ volume : num 0.000333 0.000155 0.000149 0.000141 0.000147 ... #> $ axis_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ segment_ID : int 44 44 44 44 44 44 44 44 44 44 ... #> $ node_ID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branching_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ cyl_ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent_ID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ UnmodRadius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ branch_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growthLength : num 34.2 34.2 34.2 34.1 34.1 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ distanceFromBase : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ distanceToTwig : num 3.44 3.38 3.36 3.33 3.3 ... #> $ reversePipeAreaBranchorder : int 121 121 121 121 121 121 121 121 121 121 ... #> $ reversePipeRadiusBranchorder: num 11 11 11 11 11 11 11 11 11 11 ... #> $ vesselVolume : num 416 409 406 403 400 ... #> - attr(*, \".internal.selfref\")="},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.2.0","text":"cluster_cloud(): New function transfer QSM variables input point cloud simulate point cloud QSM. Efficient nearest neighbor searching done C++ nanoflann library: https://github.com/jlblancoc/nanoflann prune_qsm(): new function efficiently easily prune QSMs using multiple pruning criteria return options. aRchi QSMs now supported package. Users can now pass radius color column variables either unquoted quoted user facing functions like plot_qsm(), qsm_summary(), export_mesh(). Piping QSM cylinders functions allows user easily select unquoted columns. update_cylinders(): Three new allometric scaling variables standard outputs - vessel_volume, pipe_area, pipe_radius. plot_qsm(): Point clouds stem triangulation meshes can now plotted independently QSM. triangulation: user can now plot TreeQSM triangulation meshes passing triangulation list import_qsm(). user can also control color palette tri_color tri_palette. pan: right mouse button now pans plot instead zooming default. functionality mimics pan3d() RGL, rewritten Rcpp better responsiveness. lit: Enable disable plot lighting alpha: Set cylinder transparency. Note: can degrade performance large numbers cylinders facets. axes_color: axes color can now set user. skeleton_lwd: Set line width skeleton plots. normalize: Center cylinders around 0,0,0. Defaults FALSE. correct_radii(): broken branch filter can now disabled, broken_branch = FALSE Now returns modified, index cylinders modified Real Twig. run_rtwig(): broken branch filter can now disabled, broken_branch = FALSE","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-2-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.2.0","text":"~ 2 - 3x performance improvement! outlier broken branch filters rewritten Rcpp, massive performance gains. Parallel processing removed, eliminating overhead excessive memory usage. update_cylinders(): Fix bug path metrics SimpleForest QSMs (issue #4). Refactored tidyeval. Fix bug triangulation using correct ending cylinder. box_dimension(): 3D plot now pans right mouse button. run_rtwig(): Fix missing Treegraph parameter (issue #5). Fix bug start x,y,z values incorrect. Fix bug NA cylinder orientation values cause calculations fail. NA values removed user sees warning promoting check QSM. QSM network now cached temp folder avoid repeat calculations. Data checking helpful error messages now included every function. Add Real Twig Method paper citation package readme. New website look. Update vignettes. Update twig data base. Reduced package dependencies.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.2.0","text":"qsm_summary(): User can pass radius either quoted unquoted column name, longer default value. Failing provide radius throw error prompting user radius column name. correct_radii(): parallel processing removed, backend longer parameter. run_rtwig():parallel processing removed, backend longer parameter. file changed filename run_rtwig(), import_qsm(), import_treegraph() consistent functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-110","dir":"Changelog","previous_headings":"","what":"rTwig 1.1.0","title":"rTwig 1.1.0","text":"CRAN release: 2024-08-20","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.1.0","text":"run_rtwig(): New function run Real Twig method calculate tree metrics one simple function. standardize_qsm(): New function standardize variable names across supported QSM software. See dictionary vignette details variable names. tree_metrics(): New function calculate standard outputs TreeQSM, plus new variables, metrics, simulated point clouds reconstructed entirely QSM. Computationally expensive tasks implemented Rcpp maximum performance. import_treegraph(): New function import Treegraph QSM. Treegraph support implemented throughout package! update_cylinders(): New variables: distanceFromBase, distanceToTwig, branch_alt. QSM topology now verified corrected topological errors. plot_qsm() Complete refactor Rcpp tidyeval massive performance improvements New QSM skeleton plotting option Supports plotting multiple QSMs plot Cylinder cloud colors can now set random bg_color can change background color plot export_mesh() Complete refactor Rcpp tidyeval massive performance improvements Cylinder color parameter can now set random, FALSE disable exporting colors Note: color exporting fixed future rgl package update","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-1-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.1.0","text":"Implement Rcpp across package plot_qsm() > 10x performance improvement! smooth_qsm() > 10x performance improvement! export_mesh() > 10x performance improvement! box_dimension() ~ 3x performance improvement update_cylinder() ~2x performance improvement better vectorization Cleaned variable names removed repeat calculations Verify correct QSM topology Reduced package dependencies Cleanup function imports Update twig data base Update vignettes Update citations","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.1.0","text":"parent child cylinder IDs, nodes, branches begin numbering 1 ensure compatibility R indexing igraph. affects SimpleForest Treegraph. Redefined SimpleForest branch structure begin new branch order end twig. ensures consistency code calculations TreeQSM, Treegraph, SimpleForest. old branch definition saved new variable called branch_alt, changed begin zero consistent new branch_alt variable Real Twig. Renamed twigRad function parameter twig_radius consistent tidy style guidelines Renamed GrowthLength growthLength consistent SimpleForest Variable names qsm_summary() updated explicit consistent outputs tree_metrics() plot_qsm() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. export_mesh() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. plot_stand() deprecated functionality now incorporated plot_qsm() twigs: renamed scientific.name scientific_name radius.mm radius_mm consistent naming conventions across package.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-102","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.2","title":"rTwig 1.0.2","text":"CRAN release: 2024-04-08 Reduced package size Allow user run examples Small text formatting changes Vignette webpage typo fixes Improved treedata import import_qsm()","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-101","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.1","title":"rTwig 1.0.1","text":"Initial CRAN Submission","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-100","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.0","title":"rTwig 1.0.0","text":"Initial release Real Twig!","code":""}]
Morales A, MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. -R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. +R package version 1.2.0, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/.
@Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, - note = {R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig}, + note = {R package version 1.2.0, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, }
Morales A, MacFarlane D (2024). diff --git a/index.html b/index.html index 7fbd9c1..7516ba6 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/news/index.html b/news/index.html index daa2a56..1470070 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/pkgdown.yml b/pkgdown.yml index e243bd2..c35d4fe 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -8,7 +8,7 @@ articles: Overview: Overview.html Twigs: Twigs.html Validation: Validation.html -last_built: 2024-11-07T19:00Z +last_built: 2024-11-07T19:09Z urls: reference: https://aidanmorales.github.io/rTwig/reference article: https://aidanmorales.github.io/rTwig/articles diff --git a/reference/box_dimension.html b/reference/box_dimension.html index d599203..19a48ed 100644 --- a/reference/box_dimension.html +++ b/reference/box_dimension.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/cluster_cloud.html b/reference/cluster_cloud.html index 952b063..1ec97af 100644 --- a/reference/cluster_cloud.html +++ b/reference/cluster_cloud.html @@ -17,7 +17,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/correct_radii.html b/reference/correct_radii.html index 6444ac3..1253352 100644 --- a/reference/correct_radii.html +++ b/reference/correct_radii.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/export_mat.html b/reference/export_mat.html index b2e3ecd..e9c3dd0 100644 --- a/reference/export_mat.html +++ b/reference/export_mat.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/export_mesh.html b/reference/export_mesh.html index b581644..dcfc95e 100644 --- a/reference/export_mesh.html +++ b/reference/export_mesh.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/import_qsm.html b/reference/import_qsm.html index dbb1623..80fc4b2 100644 --- a/reference/import_qsm.html +++ b/reference/import_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/import_treegraph.html b/reference/import_treegraph.html index fe0116e..1723654 100644 --- a/reference/import_treegraph.html +++ b/reference/import_treegraph.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/index.html b/reference/index.html index 85e43aa..c3691ba 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/plot_qsm.html b/reference/plot_qsm.html index 818c11f..8a1317e 100644 --- a/reference/plot_qsm.html +++ b/reference/plot_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/prune_qsm.html b/reference/prune_qsm.html index a04b76c..7ba51ea 100644 --- a/reference/prune_qsm.html +++ b/reference/prune_qsm.html @@ -13,7 +13,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/qsm_summary.html b/reference/qsm_summary.html index 14a5283..6a72c39 100644 --- a/reference/qsm_summary.html +++ b/reference/qsm_summary.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/rTwig-package.html b/reference/rTwig-package.html index 5568440..5d331fe 100644 --- a/reference/rTwig-package.html +++ b/reference/rTwig-package.html @@ -9,7 +9,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/run_rtwig.html b/reference/run_rtwig.html index 2ee2f63..723b339 100644 --- a/reference/run_rtwig.html +++ b/reference/run_rtwig.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/smooth_qsm.html b/reference/smooth_qsm.html index 39de3b7..6d34554 100644 --- a/reference/smooth_qsm.html +++ b/reference/smooth_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/standardize_qsm.html b/reference/standardize_qsm.html index f1d256e..6b1b8cc 100644 --- a/reference/standardize_qsm.html +++ b/reference/standardize_qsm.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/tree_metrics.html b/reference/tree_metrics.html index f6a34c4..9f082fc 100644 --- a/reference/tree_metrics.html +++ b/reference/tree_metrics.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/twigs.html b/reference/twigs.html index 1d2ebe6..1fcec5c 100644 --- a/reference/twigs.html +++ b/reference/twigs.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/reference/update_cylinders.html b/reference/update_cylinders.html index 9c016e4..d019a60 100644 --- a/reference/update_cylinders.html +++ b/reference/update_cylinders.html @@ -7,7 +7,7 @@ rTwig - 1.1.0.9000 + 1.2.0 diff --git a/search.json b/search.json index 9ad37b6..a0f8cc2 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Box-Dimension","text":"Box dimension measure structural complexity object. grounded theoretical fractal analysis applied three-dimensional point cloud data. method uses box counting (appropriately voxel counting), relationship total number boxes needed contain point cloud box size structural complexity point cloud. Box dimension slope simple linear equation log number boxes, log inverse box size. larger R-squared value indicates self similarity point cloud. Box dimension ranges 1 (line) 3 (solid cube). box dimension 2.72 special object known Menger sponge, zero volume infinite surface area. individual trees box dimension 1 2.2. Box dimension sensitive resolution level occlusion point cloud. low resolution can lead oversimplification, much occlusion can lead boxes used contain cloud box size decreases. good quality point cloud low occlusion resolution 0-1 cm optimal calculating box dimension.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Box-Dimension","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Box-Dimension","text":"first step load rTwig package.","code":"library(rTwig)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-point-cloud","dir":"Articles","previous_headings":"","what":"Load Point Cloud","title":"Box-Dimension","text":"Now need load point cloud. Box dimension can run point cloud, single trees, entire forest stands. Let’s use example Kentucky coffee tree.","code":"file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"box-dimension","dir":"Articles","previous_headings":"","what":"Box Dimension","title":"Box-Dimension","text":"Now can calculate box dimension point cloud box_dimension function. need specify location x, y, z coordinates, defaults first three columns point cloud data frame. can also set lower cutoff, smallest box size. Since point cloud resolution 1 cm, set lowercutoff parameter 0.01 m, also default. Let’s take look summary data extract box dimension (slope).","code":"# Box Dimension Summary output <- box_dimension(cloud) str(output) #> List of 2 #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 9 obs. of 2 variables: #> ..$ log.box.size: num [1:9] 0 0.693 1.386 2.079 2.773 ... #> ..$ log.voxels : num [1:9] 1.1 1.95 3.09 4.11 5.18 ... #> ..- attr(*, \".internal.selfref\")= #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 1 obs. of 4 variables: #> ..$ r.squared : num 1 #> ..$ adj.r.squared: num 1 #> ..$ intercept : num 1.02 #> ..$ slope : num 1.48 # Box Dimension (slope) output[[2]]$slope #> [1] 1.483312"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Box-Dimension","text":"can also plot results 2D 3D plots, setting plot parameter 2D, 3D . plot parameter set FALSE default speed calculations.","code":"# 2D Plot output <- box_dimension(cloud, plot = \"2D\") # 3D Plot output <- box_dimension(cloud, plot = \"3D\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Dictionary","text":"Real Twig allows QSM variable names standardized across TreeQSM, SimpleForest, Treegraph, aRchi. done standardize_qsm() function, creates consistent experience working QSMs. detailed definitions variable names using rTwig QSM format.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"cylinder-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Cylinder Attributes","title":"Dictionary","text":"start: defines x, y, z coordinates center cylinder’s base. axis: defines x, y, z axis formed cylinder’s base top. end: defines x, y, z coordinates center cylinder’s top. id: first cylinder id 1 base tree. largest id value equal number rows data frame. parent: shows relationships individual cylinders QSM. parent first cylinder always zero, base tree parent. Within branch, parent cylinders always one less child. base branch, parent cylinder cylinder branch connected . radius: radius cylinder meters. raw_radius: radius cylinder possible modifications. using TreeQSM, always UnmodRadius column. using SimpleForest Treegraph, copy radius Real Twig run. Real Twig always uses radius corrections. modified: average index cylinder radius outlier modified Real Twig across QSM paths. value 0 indicates cylinder never modified path, value 1 indicates modified every path. value 0 1 modified , paths. length: length cylinder meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"branch-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Branch Attributes","title":"Dictionary","text":"branch: branch defined starting new branch order continuing twig reached. definition TreeQSM Treegraph use. SimpleForest branches converted definition standardizing QSM. first branch always main stem rTwig format. Treegraph QSMs retain definition branches. TreeQSM SimpleForest numbered consecutively order cylinder ids. branch_position: index cylinder’s position within branch. TreeQSM’s PositionInBranch definition. first position always base branch, last position always twig branch end case broken branch. branch_order: order every branch. smallest branch order zero always main stem. First order branches connected main stem, forth higher order branches. new branch order always begins new branching fork, continues twig end broken branch, one greater parent order. definition consistent TreeQSM, SimpleForest, Treegraph, rTwig format always defines main stem order zero consistency. reverse_order: reverse branch order (RBO). Traditional branch ordering relative main stem, tell us anything position size branch. Small twigs large branches can first order branches connected main stem traditional definition. RBO solves problem considering relative position branches within QSM. RBO assigns value one end twigs broken branches, works backwards base tree reached, assigned highest RBO. RBO branch maximum segment (internode) depth relative twigs tree. branch_alt: alternate branch index. Alternate branch zero always main stem. rest branches first order branches children. similar cutting first order branches saw labeling consecutively. using SimpleForest QSM, old branchID column updated main stem index zero.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"segment-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Segment Attributes","title":"Dictionary","text":"segment: segment (internode) portion tree branching forks (nodes). new segment begins every branch fork. Cylinders part segment cylinder one child new segment created. rTwig format always defines base tree first segment. parent_segment: shows relationships segments QSM. parent segment first segment always zero, first segment (base tree) parent segment. parent segment node current segment forked . total_children: total number cylinders supported given cylinder. useful find branches fork. value one means branching forks. value two means one branching fork, etc.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"additional-metrics","dir":"Articles","previous_headings":"Dictionary","what":"Additional Metrics","title":"Dictionary","text":"growth_length: growth length meters given cylinder. Growth length can defined sum lengths cylinders supported given cylinder. can visualize growth length cutting tree saw given point. cumulative length cut portion growth length part tree cut. growth length base tree sum lengths cylinders QSM. growth length twig simply length cylinder. Growth length reflects measurement taken real tree, easier obtain QSMs. base_distance: distance meters given cylinder base tree. distance calculated taking simplest complete path given cylinder base tree. twig_distance: average distance meters given cylinder away supported twigs. calculated finding complete simple paths given cylinder supported twigs, summing lengths, dividing number paths. vessel_volume: theoretical cumulative volume living vessels supported given cylinder based allometric scaling theory. sum pipe_area * length supported cylinders. pipe_area: theoretical cross-sectional area given cylinder based allometric scaling theory. units values total number supported twigs. pipe_radius: theoretical radius given cylinder based allometric scaling theory. units values square root total number supported twigs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Metrics","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr, tidyr, ggplot packages help data manipulation visualization, ggpubr multi-panel plots, rgl point cloud plotting.","code":"devtools::install_github(\"https://github.com/aidanmorales/rTwig\") # Load rTwig library(rTwig) # Other useful packages library(rgl) library(tidyr) library(dplyr) library(ggplot2) library(ggpubr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"run-real-twig-calculate-metrics","dir":"Articles","previous_headings":"","what":"Run Real Twig & Calculate Metrics","title":"Metrics","text":"Next, let’s run Real Twig run_rtwig() calculate tree metrics tree_metrics().","code":"# File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Run Real Twig cylinder <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) # Calculate detailed tree metrics metrics <- tree_metrics(cylinder)"},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"point-cloud","dir":"Articles","previous_headings":"Run Real Twig & Calculate Metrics","what":"Point Cloud","title":"Metrics","text":"can even plot simulated point cloud rgl library, look cylinder connectivity.","code":"plot_qsm(cylinder, qsm$cylinder, cloud = metrics$cloud, skeleton = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"plotting-code","dir":"Articles","previous_headings":"","what":"Plotting Code","title":"Metrics","text":"","code":"# Stem Taper ------------------------------------------------------------------- metrics$stem_taper %>% ggplot(aes(x = height_m, y = diameter_cm)) + geom_point() + stat_smooth(method = \"loess\", color = \"black\", formula = y ~ x) + theme_classic() + labs( title = \"Stem Taper\", x = \"Height (m)\", y = \"Diameter (cm)\" ) # Tree Metrics ----------------------------------------------------------------- # Tree Height Distributions metrics$tree_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Tree Diameter Distributions metrics$tree_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Tree Zenith Distributions metrics$tree_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Tree azimuth distributions metrics$tree_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + theme_classic() + facet_wrap(~type) + theme(legend.position = \"right\") # Branch Metrics --------------------------------------------------------------- # Branch diameter distributions metrics$branch_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Branch height distributions metrics$branch_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Branch angle distributions metrics$branch_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch zenith distributions metrics$branch_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch azimuth distributions metrics$branch_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch order distributions metrics$branch_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = branch_order, y = value, color = branch_order, fill = branch_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Order Distributions\", x = \"\", y = \"\", fill = \"Branch Order\", color = \"Branch Order\" ) + facet_wrap(~type) + # Segment Metrics -------------------------------------------------------------- # Segment diameter distributions metrics$segment_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Segment height distributions metrics$segment_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Segment angle distributions metrics$segment_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + # Segment zenith distributions metrics$segment_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment azimuth distributions metrics$segment_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment order distributions metrics$segment_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = reverse_order, y = value, color = reverse_order, fill = reverse_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Reverse Order Distributions\", x = \"\", y = \"\", fill = \"Reverse Order\", color = \"Reverse Order\" ) + facet_wrap(~type) + theme_classic() # Spreads ---------------------------------------------------------------------- spreads <- metrics$spreads # Generate colors from red to blue n <- length(unique(spreads$height_class)) colors <- data.frame(r = seq(0, 1, length.out = n), g = 0, b = seq(1, 0, length.out = n)) # Convert colors to hex color_hex <- apply(colors, 1, function(row) { rgb(row[1], row[2], row[3]) }) # Assign colors to height classes height_class_colors <- data.frame( height_class = unique(spreads$height_class), color = color_hex ) spreads %>% left_join(height_class_colors, by = \"height_class\") %>% ggplot(aes(x = azimuth_deg, y = spread_m, group = height_class, color = color)) + geom_line() + scale_color_identity() + coord_polar(start = 0) + labs(x = \"\", y = \"\") + theme_minimal() + theme(axis.text.y = element_blank()) # Vertical profile ------------------------------------------------------------- metrics$spreads %>% group_by(height_class) %>% summarise( max = max(spread_m), mean = mean(spread_m), min = min(spread_m) ) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes(x = height_class, y = value, color = type)) + geom_line() + labs( x = \"Height Class\", y = \"Spread (m)\", color = \"\" ) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Overview","text":"Real Twig designed tested using QSMs created TreeQSM modeling software. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume within ± 10% real tree volume. given QSM provides parent-child cylinder relationships, Real Twig work, case SimpleForest, Treegraph, aRchi software packages. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume across multiple different software packages. Real Twig can provide excellent tree volume estimates, can transform poor quality data good data. general rule thumb, closer QSM resembles actual tree correction, better results correction. Real Twig performs best topology tree correct, cylinder sizes main sources QSM error. Errors QSM topology become readily apparent correction, Real Twig can also used visually validate QSM topology without reference data.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Overview","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr package help data manipulation.","code":"# Load rTwig library(rTwig) # Other useful packages library(dplyr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"import-qsm","dir":"Articles","previous_headings":"","what":"Import QSM","title":"Overview","text":"rTwig supports available versions TreeQSM, v2.0 v2.4.1 time writing. important note legacy versions TreeQSM (v2.0) store data much different format modern versions (v2.3.0-2.4.1). strongly advised use latest version TreeQSM rTwig best QSM topology volume estimates. Older versions can used, QSM topology poor, volume underestimation almost guaranteed. Regardless version TreeQSM MATLAB used, import_qsm() function import QSM (.mat extension) convert data format usable R. user must specify version TreeQSM using version parameter. rTwig automatically defaults use new TreeQSM format, older format can imported version = \"2.0\". import_qsm() also imports QSM information, including cylinder, branch, treedata, rundata, pmdistance, triangulation data, stored together list. SimpleForest exports QSMs .csv files, easy load R using built read.csv() function. QSM contains thousands cylinders, much faster use fread() function data.table package take advantage multi-threaded support. Treegraph exports QSMs .json files. import R, can use import_treegraph() function quickly load Treegraph QSM. aRchi built R, provided function import data. Users can extract aRchi cylinder data aRchi::get_QSM() running rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-1-treeqsm-v2-3-0---2-4-1","dir":"Articles","previous_headings":"Import QSM","what":"Example 1: TreeQSM v2.3.0 - 2.4.1","title":"Overview","text":"can import QSM supplying import_qsm() function directory QSM. QSM list six elements. can check follows: Let’s check version TreeQSM used, date QSM made, take look cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Import and save QSM qsm <- import_qsm(file) summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list # QSM info qsm$rundata$version #> [1] \"2.4.1\" qsm$rundata$start.date #> [1] \"2023-12-06 10:14:31 UTC\" # Number of cylinders str(qsm$cylinder) #> 'data.frame': 1136 obs. of 17 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ parent : int 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 2 3 4 5 6 7 8 9 10 11 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: int 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-2-treeqsm-v2-0","dir":"Articles","previous_headings":"Import QSM","what":"Example 2: TreeQSM v2.0","title":"Overview","text":"Let’s try importing old QSM check structure.","code":"# QSM Directory file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") # Import and save QSM qsm2 <- import_qsm(file, version = \"2.0\") # QSM Info summary(qsm2) #> Length Class Mode #> cylinder 15 data.frame list #> treedata 33 -none- list str(qsm2$cylinder) #> 'data.frame': 1026 obs. of 15 variables: #> $ radius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ length : num 0.335 0.283 0.272 0.244 0.267 ... #> $ start.x : num 8.4 8.43 8.44 8.47 8.5 ... #> $ start.y : num 47.7 47.7 47.7 47.8 47.8 ... #> $ start.z : num 2.23 2.57 2.85 3.12 3.36 ... #> $ axis.x : num 0.1103 0.0531 0.0878 0.1666 0.0894 ... #> $ axis.y : num 0.0337 0.0296 0.1282 0.0801 0.061 ... #> $ axis.z : num 0.993 0.998 0.988 0.983 0.994 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : num 1 2 3 4 5 6 7 8 9 10 ... #> $ added : int 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ branch : num 1 1 1 1 1 1 1 1 1 1 ... #> $ BranchOrder : num 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: num 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-3-simpleforest","dir":"Articles","previous_headings":"Import QSM","what":"Example 3: SimpleForest","title":"Overview","text":"Let’s take look SimpleForest cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Import and save QSM cylinder data cylinder <- read.csv(file) str(cylinder) #> 'data.frame': 1149 obs. of 17 variables: #> $ ID : int 0 1 2 3 4 5 6 7 8 9 ... #> $ parentID : int -1 0 1 2 3 4 5 6 7 8 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance: num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parentSegmentID : int -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branchID : int 0 0 0 0 0 0 0 0 0 0 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"cylinder-data","dir":"Articles","previous_headings":"","what":"Cylinder Data","title":"Overview","text":"Next, update parent-child ordering cylinder data allow path analysis add new QSM variables. important QSM variable growth length. Growth length cumulative length metric, growth length cylinder length, plus lengths children. gives us perfect ordering along branch path, highest growth length equal base tree, twigs growth length equal cylinder length. also important note number twigs QSM always equal number paths QSM, since path goes base tree twig tip. also calculate several additional variables improve QSM analysis visualization. reverse branch order (RBO) assigns order 1 twigs, works backwards base main stem, highest RBO. RBO essentially maximum node depth given branch segment (area branching forks). RBO problematic twig cylinders easy identify. distance cylinder base, average distance cylinder supported twigs new ways help visualize problematic cylinders. Let’s save cylinders new variable make easier work update ordering.","code":"# Save cylinders to new object cylinder <- qsm$cylinder # Update cylinder data cylinder <- update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"topology","dir":"Articles","previous_headings":"","what":"Topology","title":"Overview","text":"correct QSM, often worthwhile check quality QSM plotting input point cloud. , load point cloud save data frame, first three columns x, y, z columns. use plot_qsm() function . want check raw cylinder fits possible modification, use raw cylinder radii.","code":"# Load the input point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) # Plot the qsm and point cloud plot_qsm(cylinder = cylinder, cloud = cloud, radius = \"UnmodRadius\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"twig-diameters","dir":"Articles","previous_headings":"","what":"Twig Diameters","title":"Overview","text":"can correct QSM radii, need know real twig diameter . example tree, species Kentucky coffee tree (Gymnocladus dioicus), nice, stout twigs. rTwig comes data base twigs can called typing twigs data set. data set includes average twig radius, min max radius, standard deviation, coefficient variation. Let’s look twig data set find twig diameter Kentucky coffee tree.","code":"# Look at the twigs database twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows # Find our species filter(twigs, scientific_name == \"Gymnocladus dioicus\") #> # A tibble: 1 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Gymnocladus dioicus 4.23 30 2.79 6.6 0.87 0.2"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"summary-metrics","dir":"Articles","previous_headings":"","what":"Summary Metrics","title":"Overview","text":"correct QSM, Let’s take look current metrics, can compare tree volume correction. can qsm_summary() function. stem triangulation enabled TreeQSM, can use better represent main stem volume cases, especially large buttress flares. can also make plot radius versus growth length see much overestimation twig radii. Looking diagnostic plot log log scale, measured twig radius horizontal line, can see nearly twig radii overestimated, increasing radii variation growth length approaches zero. Except main stem, clear pattern individual branch tapering.","code":"# QSM summary qsm_summary(cylinder = cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.644 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 # QSM summary with Triangulation qsm_summary(cylinder = cylinder, radius = radius, triangulation = qsm$triangulation)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"correct-radii","dir":"Articles","previous_headings":"","what":"Correct Radii","title":"Overview","text":"Now can correct QSM cylinder radii correct_radii() function. step, model path tree separately, poorly fit cylinders identified removed, GAM fit, intercept measured twig radius, growth length predicts cylinder radius. Let’s correct cylinder radii Kentucky coffee tree look new volume estimates diagnostic plots. can see reduced volume QSM around 3 liters, around 15% overestimation volume correction. Kentucky coffee tree relatively large twigs, overestimation severe tree much smaller twigs, can upwards >200% overestimation cases. Looking diagnostic plot, can see individual branches can clearly identified unique allometry. Notice nearly volume reduction occurred higher order branches, main stem remaining nearly unchanged. branches now taper towards measured twig radius Kentucky coffee tree. Getting real twig diameter critical, high value overestimate volume, low value underestimate total volume, underestimate proportional number twigs small branches tree. species available database, found genus level twig radius average good substitute.","code":"# Correct cylinder radii cylinder <- correct_radii(cylinder, twig_radius = 4.23) # Corrected QSM summary qsm_summary(cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.640 #> 2 1 5.20 0.754 #> 3 2 2.69 0.583 #> 4 3 0.539 0.170 #> 5 4 0.104 0.0431 #> 6 5 0.00683 0.00308"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Overview","text":"Optionally, can smooth QSM ensuring cylinders connected. visual change affect volume estimates. can smooth_qsm() function, plot results plot_qsm() function. different colors different branch orders. can also color QSM many different variables palettes. See plot_qsm() documentation details. can also save QSM mesh (.ply extension) use modeling programs export_mesh() function. colors palettes found plot_qsm() function can used color mesh.","code":"# Smooth QSM cylinder <- smooth_qsm(cylinder) # Plot QSM plot_qsm(cylinder) # QSM Custom Colors & Piping cylinder %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"magma\" ) # Plot Twigs Colored by Unique Segment cylinder %>% filter(reverseBranchOrder == 1) %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"rainbow\" ) # Export Mesh Colored by RBO cylinder %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"magma\" ) # Export Twigs Colored by Unique Segments cylinder %>% filter(reverseBranchOrder == 1) %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"rainbow\" )"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"workflow-best-practices","dir":"Articles","previous_headings":"","what":"Workflow & Best Practices","title":"Overview","text":"overview typical rTwig processing chain. dealing multiple trees, advise creating master data frame tidy format, unique tree row, columns tree id, directory QSM .mat file, species twig diameter, can tailored workflow needs. simple matter looping master data frame, correcting tree, saving results master list. Make sure read function’s documentation examples unique features.","code":"# Import QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Real Twig Main Steps cylinder <- run_rtwig(file, twig_radius = 4.23) # Tree Metrics metrics <- tree_metrics(cylinder) # Plot Results plot_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Twigs","text":"Twigs smallest ground woody component tree. Twigs responsible supporting delicate tissues needed grow leaves protect buds dormant season. twig measurements basis Real Twig method, publicly available databases twigs limited, present database twig measurements wide range tree genera species.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Twigs","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Twigs","text":"first step load rTwig package.","code":"library(rTwig) #> Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display #> Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. # Useful packages library(dplyr) library(ggplot2)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"twig-database","dir":"Articles","previous_headings":"","what":"Twig Database","title":"Twigs","text":"twig database built directly rTwig can called follows: database broken 7 different columns. scientific_name specific epithet. Genus spp. average species genus. radius_mm twig radius millimeters. species, n number unique twig samples taken, min minimum twig radius, max max twig radius, std standard deviation, cv coefficient variation. Let’s see breakdown species.","code":"# If the rTwig library has been loaded twigs # If rTwig hasn't been loaded, but just the twigs are needed rTwig::twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows unique(twigs$scientific_name) #> [1] \"Abies concolor\" \"Abies spp.\" #> [3] \"Acer platanoides\" \"Acer rubrum\" #> [5] \"Acer saccharinum\" \"Acer saccharum\" #> [7] \"Acer spp.\" \"Aesculus flava\" #> [9] \"Aesculus spp.\" \"Betula nigra\" #> [11] \"Betula spp.\" \"Carya cordiformis\" #> [13] \"Carya ovata\" \"Carya spp.\" #> [15] \"Castanea dentata\" \"Castanea spp.\" #> [17] \"Cercis canadensis\" \"Cercis spp.\" #> [19] \"Cladrastis kentukea\" \"Cladrastis spp.\" #> [21] \"Cornus mas\" \"Cornus officinalis\" #> [23] \"Cornus spp.\" \"Crataegus spp.\" #> [25] \"Fagus grandifolia\" \"Fagus spp.\" #> [27] \"Fagus sylvatica\" \"Fraxinus americana\" #> [29] \"Fraxinus pennsylvanica\" \"Fraxinus quadrangulata\" #> [31] \"Fraxinus spp.\" \"Ginkgo biloba\" #> [33] \"Ginkgo spp.\" \"Gleditsia spp.\" #> [35] \"Gleditsia triacanthos\" \"Gymnocladus dioicus\" #> [37] \"Gymnocladus spp.\" \"Gymnopodium floribundum\" #> [39] \"Gymnopodium spp.\" \"Juglans cinerea\" #> [41] \"Juglans nigra\" \"Juglans spp.\" #> [43] \"Laguncularia racemosa\" \"Laguncularia spp.\" #> [45] \"Larix laricina\" \"Larix spp.\" #> [47] \"Liquidambar spp.\" \"Liquidambar styraciflua\" #> [49] \"Liriodendron spp.\" \"Liriodendron tulipifera\" #> [51] \"Magnolia acuminata\" \"Magnolia spp.\" #> [53] \"Malus spp.\" \"Metasequoia glyptostroboides\" #> [55] \"Metasequoia spp.\" \"Nyssa spp.\" #> [57] \"Nyssa sylvatica\" \"Ostrya spp.\" #> [59] \"Ostrya virginiana\" \"Phellodendron amurense\" #> [61] \"Phellodendron spp.\" \"Picea abies\" #> [63] \"Picea omorika\" \"Picea pungens\" #> [65] \"Picea spp.\" \"Pinus nigra\" #> [67] \"Pinus spp.\" \"Pinus strobus\" #> [69] \"Platanus acerifolia\" \"Platanus occidentalis\" #> [71] \"Platanus spp.\" \"Populus deltoides\" #> [73] \"Populus spp.\" \"Prunus serotina\" #> [75] \"Prunus spp.\" \"Prunus virginiana\" #> [77] \"Quercus acutissima\" \"Quercus alba\" #> [79] \"Quercus bicolor\" \"Quercus coccinea\" #> [81] \"Quercus ellipsoidalis\" \"Quercus imbricaria\" #> [83] \"Quercus macrocarpa\" \"Quercus michauxii\" #> [85] \"Quercus muehlenbergii\" \"Quercus palustris\" #> [87] \"Quercus robur\" \"Quercus rubra\" #> [89] \"Quercus shumardii\" \"Quercus spp.\" #> [91] \"Quercus velutina\" \"Rhizophora mangle\" #> [93] \"Rhizophora spp.\" \"Thuja occidentalis\" #> [95] \"Thuja spp.\" \"Tilia americana\" #> [97] \"Tilia spp.\" \"Tilia tomentosa\" #> [99] \"Tsuga canadensis\" \"Tsuga spp.\" #> [101] \"Ulmus americana\" \"Ulmus pumila\" #> [103] \"Ulmus rubra\" \"Ulmus spp.\""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Twigs","text":"Let’s visualize twig data!","code":"# Lets look at a subset of oak species twigs %>% filter(grepl(\"Quercus\", scientific_name)) %>% ggplot(aes(x = scientific_name, y = radius_mm, color = scientific_name)) + geom_point(aes(size = n)) + geom_errorbar(aes(ymax = max, ymin = min)) + coord_flip() + labs( title = \"Quercus Twig Radii\", x = \"\", y = \"Twig Radius (mm)\", color = \"Species\", size = \"Sample Size\" ) + scale_x_discrete(limits = rev) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-4-1","dir":"Articles","previous_headings":"","what":"TreeQSM v2.4.1","title":"Validation","text":"mass estimates statistics using TreeQSM v2.4.1 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-3-0","dir":"Articles","previous_headings":"","what":"TreeQSM v2.3.0","title":"Validation","text":"mass estimates statistics using TreeQSM v2.3.0 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"simpleforest","dir":"Articles","previous_headings":"","what":"SimpleForest","title":"Validation","text":"important note Real Twig tested SimpleForest development. Real Twig improve volume estimates SimpleForest versus built allometric corrections, still improvements made, SimpleForest QSM cylinders generally much overestimated TreeQSM cylinders, making identification “good” cylinders difficult. mass estimates statistics using SimpleForest v5.3.2 built vessel volume correction, Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Aidan Morales. Author, maintainer, copyright holder. David W. MacFarlane. Author, copyright holder.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Morales , MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. Morales , MacFarlane D (2024). “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 1-16. doi:10.1093/forestry/cpae046.","code":"@Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, note = {R package version 1.1.0.9000, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, } @Article{, title = {Reducing tree volume overestimation in quantitative structure models using modeled branch topology and direct twig measurements}, author = {Aidan Morales and David W. MacFarlane}, journal = {Forestry: An International Journal of Forest Research}, year = {2024}, pages = {1-16}, doi = {https://doi.org/10.1093/forestry/cpae046}, }"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Realistic Quantitative Structure Models","text":"Real Twig method correct unrealistic cylinders quantitative structure models (QSMs), different traditional allometric statistical corrections. Small branch twig cylinders overestimated QSMs due technical limitations current LiDAR sensor technology. Real Twig overcomes limitations using real direct twig diameter measurements corresponding tree species inform individual path taper models QSM. Real Twig dynamically identifies realistic cylinders QSM using network analysis, general additive models, direct twig measurements, model correct unrealistic cylinders high degree precision accuracy vetted ground truth reference data. Real Twig method presented R package, rTwig. rTwig includes novel database twig diameter measurements many common North American European trees, make method immediately accessible user. addition, rTwig includes fast efficient tools QSM visualization analysis seamlessly compatible R ecosystem, point cloud fractal analysis visualization using box-dimension metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"method","dir":"","previous_headings":"","what":"Method","title":"Realistic Quantitative Structure Models","text":"complete description validation Real Twig can read : Aidan Morales, David W. MacFarlane. “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 2024, pp. 1-16. https://doi.org/10.1093/forestry/cpae046.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"realistic-trees","dir":"","previous_headings":"Features","what":"Realistic Trees","title":"Realistic Quantitative Structure Models","text":"main goal Real Twig correct volume overestimation QSMs caused limitations LiDAR sensors better non-destructive ground biomass (AGB) estimates. Real Twig incorporates direct twig measurement QSM, resulting models accurate volume metrics, also visually realistic, independent tree species size. example, shown 300+ year old white oak tree (Quercus alba), without Real Twig.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"efficient-visualization","dir":"","previous_headings":"Features","what":"Efficient Visualization","title":"Realistic Quantitative Structure Models","text":"plot_qsm() can plot QSMs point clouds, using rgl 3D display, C++ via Rcpp efficiently build cylinders. cylinders, simulated point cloud, skeleton can plotted colored variable user supplied color palette. can also visualize stem triangulation meshes TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"detailed-tree-metrics","dir":"","previous_headings":"Features","what":"Detailed Tree Metrics","title":"Realistic Quantitative Structure Models","text":"goal rTwig provide users tools visualize analyze QSM metrics without tied particular QSM software. end, standardize_qsm() provides consistent naming convention supported QSMs, making easy combine analyze QSMs different sources. tree_metrics() calculates major QSM metrics supported software. prune_qsm() can virtually prune tree using multiple input parameters. cluster_cloud() can transfer QSM metrics directly onto unorganized point cloud, simulate virtual point cloud. See vignettes function reference pages details.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"supported-software","dir":"","previous_headings":"Features","what":"Supported Software","title":"Realistic Quantitative Structure Models","text":"rTwig currently supports TreeQSM, SimpleForest, Treegraph, aRchi","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"functions","dir":"","previous_headings":"","what":"Functions","title":"Realistic Quantitative Structure Models","text":"run_rtwig() runs Real Twig method QSM import_qsm() imports QSM created TreeQSM (.mat) import_treegraph() imports QSM created Treegraph (.json) standardize_qsm() standardizes QSM variable names across supported software update_cylinders() updates cylinder relationships adds new QSM variables correct_radii models QSM paths corrects cylinder radii tree_metrics() generates detailed tree metrics simulated point cloud cluster_cloud() transfers QSM variables point cloud simulates point cloud qsm_summary() summarises QSM diameter, height, volume, surface area smooth_qsm() connects cylinder end--end smooth branch visualization plot_qsm() plots QSMs optionally point clouds prune_qsm() prunes QSM cylinder attributes, height, diameter classes export_mesh() exports QSM mesh object (.ply) export_mat() exports QSM MATLAB format (.mat) box_dimension() calculates visualizes structural complexity point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Realistic Quantitative Structure Models","text":"can install released version rTwig CRAN : can install development version rTwig GitHub :","code":"install.packages(\"rTwig\") # install.packages(\"devtools\") devtools::install_github(\"aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-real-twig","dir":"","previous_headings":"Installation","what":"Quick Start: Real Twig","title":"Realistic Quantitative Structure Models","text":"examples quickly run visualize Real Twig, using example data package. See vignettes details general workflow best practices.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treeqsm","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"TreeQSM","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"simpleforest","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"SimpleForest","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treegraph","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"Treegraph","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- \"path_to_treegraph_json\" # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"archi","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"aRchi","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-fractal-analysis","dir":"","previous_headings":"Installation","what":"Quick Start: Fractal Analysis","title":"Realistic Quantitative Structure Models","text":"rTwig also includes efficient function written C++ via Rcpp fractal analysis using voxel-counting method. example quickly calculate box-dimension point cloud using example data package. See vignette details explanation.","code":"# Load a point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file) # Calculate box-dimension output <- box_dimension(cloud) output[[2]]$slope"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":null,"dir":"Reference","previous_headings":"","what":"Box Dimension — box_dimension","title":"Box Dimension — box_dimension","text":"R port Dominik Seidel's fractal analysis \"box-dimension\" metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box Dimension — box_dimension","text":"","code":"box_dimension(cloud, lowercutoff = 0.01, rm_int_box = FALSE, plot = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box Dimension — box_dimension","text":"cloud point cloud matrix size n x 3. Non-matrices automatically converted matrix. lowercutoff smallest box size determined point spacing cloud meters. Defaults 1 cm. rm_int_box Remove initial box TRUE FALSE. Defaults FALSE. plot Plot results. user can specify \"2D\", \"3D\", \"\" plots. FALSE disables plotting. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box Dimension — box_dimension","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box Dimension — box_dimension","text":"box_dimension1rTwig box_dimension2rTwig box_dimension3rTwig box_dimension4rTwig box_dimension5rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box Dimension — box_dimension","text":"","code":"## Calculate Box Dimension file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) output <- box_dimension(cloud, plot = \"ALL\") #> Panning plot on rgl device: 1 output #> [[1]] #> # A tidytable: 9 × 2 #> log.box.size log.voxels #> #> 1 0 1.10 #> 2 0.693 1.95 #> 3 1.39 3.09 #> 4 2.08 4.11 #> 5 2.77 5.18 #> 6 3.47 6.14 #> 7 4.16 7.16 #> 8 4.85 8.23 #> 9 5.55 9.27 #> #> [[2]] #> # A tidytable: 1 × 4 #> r.squared adj.r.squared intercept slope #> #> 1 1.00 1.00 1.02 1.48 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster Cloud — cluster_cloud","title":"Cluster Cloud — cluster_cloud","text":"Cluster point cloud simulate point cloud based QSM. using input point cloud, cylinder ids transferred cloud using nearest neighbors. simulating cloud, points built directly cylinders user controlled spacing. cylinder id can used easily join desired variables QSM cloud. nearest neighbor search uses C++ nanoflann library.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster Cloud — cluster_cloud","text":"","code":"cluster_cloud(cylinder, cloud = NULL, spacing = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster Cloud — cluster_cloud","text":"cylinder QSM cylinder data frame. cloud input point cloud QSM cluster. NULL (default), simulated cloud returned. spacing point spacing meters simulated cloud. Defaults 0.02 meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster Cloud — cluster_cloud","text":"point cloud data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cluster Cloud — cluster_cloud","text":"blanco2014nanoflannrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster Cloud — cluster_cloud","text":"","code":"## Load Data file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") file2 <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii cloud <- read.table(file2) ## Clustered Cloud clustered_cloud <- cluster_cloud(cylinder = qsm, cloud = cloud) #> Clustering Point Cloud # # Join QSM variables and export # filename <- tempfile(pattern = \"clustered_cloud\", fileext = \".txt\") # clustered_cloud %>% # left_join(qsm) %>% # fwrite(file = filename) ## Simulated Cloud simulated_cloud <- cluster_cloud(cylinder = qsm, spacing = 0.01) #> Simulating Point Cloud # Plot Simulated Cloud plot_qsm(cloud = simulated_cloud) #> Plotting Cloud #> Panning plot on rgl device: 1 # # Join QSM variables and export # filename2 <- tempfile(pattern = \"simulated_cloud\", fileext = \".txt\") # simulated_cloud %>% # left_join(qsm) %>% # fwrite(file = filename2)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":null,"dir":"Reference","previous_headings":"","what":"Correct Radii — correct_radii","title":"Correct Radii — correct_radii","text":"Corrects cylinder radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correct Radii — correct_radii","text":"","code":"correct_radii(cylinder, twig_radius, broken_branch = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correct Radii — correct_radii","text":"cylinder QSM cylinder data frame twig_radius Twig radius millimeters broken_branch Enable disable broken branch filter. Defaults enabled (TRUE).","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correct Radii — correct_radii","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Correct Radii — correct_radii","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 30 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Export MAT — export_mat","title":"Export MAT — export_mat","text":"Exports cylinder data visualized TreeQSM's plot_cylinder_model() function","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export MAT — export_mat","text":"","code":"export_mat(cylinder, filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export MAT — export_mat","text":"cylinder QSM cylinder data frame filename Desired name file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export MAT — export_mat","text":"Returns .mat file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export MAT — export_mat","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":null,"dir":"Reference","previous_headings":"","what":"Export Mesh — export_mesh","title":"Export Mesh — export_mesh","text":"Exports QSM cylinder mesh using rgl library","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export Mesh — export_mesh","text":"","code":"export_mesh( cylinder, filename, radius = NULL, color = NULL, palette = NULL, facets = 6, normals = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export Mesh — export_mesh","text":"cylinder QSM cylinder data frame filename File name path exporting. .ply extension automatically added present. radius Radius column name either quoted unquoted. Defaults modified cylinders cylinder data frame. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. normals Option export normals. Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export Mesh — export_mesh","text":"mesh .ply file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export Mesh — export_mesh","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Import TreeQSM — import_qsm","title":"Import TreeQSM — import_qsm","text":"Imports QSM created TreeQSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import TreeQSM — import_qsm","text":"","code":"import_qsm(filename, version = \"2.x.x\")"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import TreeQSM — import_qsm","text":"filename TreeQSM .mat MATLAB file version TreeQSM version. Defaults 2.x.x. user can also specify 2.0 format.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import TreeQSM — import_qsm","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import TreeQSM — import_qsm","text":"TreeQSMrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import TreeQSM — import_qsm","text":"","code":"## Read a TreeQSM MATLAB file in the 2.3.x - 2.4.x format file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.x.x\") #> Importing TreeQSM summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list ## Read a TreeQSM MATLAB file in the 2.0 format file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.0\") #> Importing TreeQSM names(qsm) #> [1] \"cylinder\" \"treedata\""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Treegraph — import_treegraph","title":"Import Treegraph — import_treegraph","text":"Imports QSM created treegraph","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Treegraph — import_treegraph","text":"","code":"import_treegraph(filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Treegraph — import_treegraph","text":"filename treegraph .json file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Treegraph — import_treegraph","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import Treegraph — import_treegraph","text":"treegraph2rTwig treegraph1rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import Treegraph — import_treegraph","text":"","code":"if (FALSE) { # \\dontrun{ # Import a treegraph QSM qsm <- import_treegraph(\"path/to/json/file\") } # }"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot QSM — plot_qsm","title":"Plot QSM — plot_qsm","text":"Efficiently plot QSMs point clouds. Uses Rcpp RGL libraries backends.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot QSM — plot_qsm","text":"","code":"plot_qsm( cylinder = NULL, radius = NULL, color = NULL, palette = NULL, alpha = 1, facets = 6, skeleton = FALSE, skeleton_lwd = NULL, cloud = NULL, pt_color = NULL, pt_size = NULL, triangulation = NULL, tri_color = NULL, tri_palette = NULL, axes = TRUE, axes_color = NULL, grid = FALSE, grid_color = NULL, hover = FALSE, bg_color = NULL, lit = TRUE, pan = TRUE, normalize = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot QSM — plot_qsm","text":"cylinder QSM cylinder data frame. radius Radius column name either quoted unquoted. Defaults modified radii. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. alpha Set transparency cylinders. Defaults 1. 1 opaque 0 fully transparent. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. skeleton Plot QSM skeleton instead cylinders. Defaults FALSE. skeleton_lwd Skeleton line width. Defaults 1. cloud Point cloud data frame first three columns x, y, z coordinates coordinate system QSM. Defaults NULL. pt_color Color point cloud. Accepts hex colors, grDevices::colors(), \"random\". Defaults black. pt_size Size points. Defaults 0.1. triangulation Plot stem triangulation mesh TreeQSM. Defaults NULL. tri_color Color triangulation mesh. Colors must single hex color. tri_palette Optional triangulation color palette z values. Supports inputs palettes. axes Show plot axes. Defaults TRUE. axes_color Set axes color. Defaults black. grid Show plot grid lines. Defaults FALSE. grid_color Set grid lines color. Defaults grey. hover Show cylinder branch id mouse hover. Defaults FALSE. bg_color Set background color plot. Accepts hex colors grDevices::colors(). Defaults white. lit Enable light source plot. Defaults TRUE. Can set FALSE. pan Use right mouse button pan plot. Defaults TRUE, disabled hover enabled. normalize Normalize QSM 0,0,0 based provided data. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot QSM — plot_qsm","text":"rgl plot","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot QSM — plot_qsm","text":"","code":"## TreeQSM Processing Chain & Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 triangulation <- qsm$triangulation plot_qsm(triangulation = triangulation) #> Plotting Triangulation #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Prune QSM — prune_qsm","title":"Prune QSM — prune_qsm","text":"Efficiently prune QSM. user can prune cylinder, branch, segment ids, height diameter classes, individually, time, return either pruned data, remaining data, binary index cylinders pruned.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prune QSM — prune_qsm","text":"","code":"prune_qsm( cylinder, cylinder_ids = NULL, branch_ids = NULL, segment_ids = NULL, height_m = NULL, diameter_cm = NULL, invert = FALSE, index = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prune QSM — prune_qsm","text":"cylinder QSM cylinder data frame cylinder_ids single vector cylinder ids. Everything connected cylinder pruned. branch_ids single vector branch ids. Everything connected branch pruned. segment_ids single vector segment ids. Everything connected segment pruned. height_m Height class meters cylinders pruned. Valid inputs numeric one decimal. diameter_cm Branch diameter class centimeters cylinders pruned. Valid inputs numeric one decimal. invert Return remaining pruned data. Defaults TRUE (remaining data), can set FALSE. index Returns column index called pruning indicating cylinder pruned (1) un-pruned (0). Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prune QSM — prune_qsm","text":"data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prune QSM — prune_qsm","text":"","code":"## Load QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Pruning Index prune1 <- prune_qsm(cylinder, height_m = 2, index = TRUE) #> Pruning QSM plot_qsm(prune1, color = pruning, palette = \"blue2red\") #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Remaining prune2 <- prune_qsm(cylinder, height_m = 2, invert = FALSE) #> Pruning QSM plot_qsm(prune2) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Pruned prune3 <- prune_qsm(cylinder, height_m = 2, invert = TRUE) #> Pruning QSM plot_qsm(prune3) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"QSM Summary — qsm_summary","title":"QSM Summary — qsm_summary","text":"Generates simple QSM summary (e.g. volume, surface area, dbh, etc.) totals branch order.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"QSM Summary — qsm_summary","text":"","code":"qsm_summary(cylinder, radius, triangulation = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"QSM Summary — qsm_summary","text":"cylinder QSM cylinder data frame radius Radius column name either quoted unquoted. triangulation QSM triangulation list. Defaults NULL. supports TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"QSM Summary — qsm_summary","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"QSM Summary — qsm_summary","text":"","code":"## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics qsm_summary(cylinder, radius) #> Creating QSM Summary #> [[1]] #> # A tidytable: 5 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 12.9 0.768 #> 2 1 8.70 1.07 #> 3 2 6.46 0.871 #> 4 3 1.82 0.298 #> 5 4 0.0723 0.0148 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.39 3.67 12.9 17.1 30.0 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #> # TreeQSM Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics qsm_summary(cylinder, radius, triangulation = qsm$triangulation) #> Creating QSM Summary #> [[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.18 3.69 28.7 11.4 40.1 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rTwig: Realistic Quantitative Structure Models — rTwig-package","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Real Twig method correct branch overestimation quantitative structure models. Overestimated cylinders correctly tapered using measured twig diameters corresponding tree species. Supported quantitative structure modeling software includes 'TreeQSM', 'SimpleForest', 'Treegraph', 'aRchi'. Also included novel database twig diameters tools fractal analysis point clouds.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Maintainer: Aidan Morales moral169@msu.edu (ORCID) [copyright holder] Authors: David W. MacFarlane macfar24@msu.edu [copyright holder]","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Real Twig — run_rtwig","title":"Run Real Twig — run_rtwig","text":"Runs Real Twig steps","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Real Twig — run_rtwig","text":"","code":"run_rtwig( filename, twig_radius, metrics = TRUE, version = NULL, smooth = TRUE, standardize = FALSE, broken_branch = TRUE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Real Twig — run_rtwig","text":"filename file path QSM (.mat, .csv, .json) twig_radius Twig radius millimeters metrics Calculate tree metrics? Defaults TRUE. version Defaults NULL. using specific version TreeQSM, user can specify version (e.g. 2.4.1, 2.0, etc.). smooth Defaults TRUE, using TreeQSM. Can set FALSE. standardize Standardize QSM cylinder data? Defaults FALSE. Can set TRUE. broken_branch Enable disable broken branch filter. Defaults TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Real Twig — run_rtwig","text":"Returns cylinder data frame list metrics true.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Real Twig — run_rtwig","text":"","code":"## TreeQSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics str(qsm$cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.769 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.009949 -0.022059 0.016224 -0.000391 0.012068 ... #> $ axis.y : num 0.091165 0.019722 0.034392 -0.000295 0.023483 ... #> $ axis.z : num 0.996 1 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth QSM — smooth_qsm","title":"Smooth QSM — smooth_qsm","text":"Visual smoothing QSM ensuring midpoints cylinders connected","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth QSM — smooth_qsm","text":"","code":"smooth_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth QSM — smooth_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth QSM — smooth_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth QSM — smooth_qsm","text":"","code":"file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Before Smoothing plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## After Smoothing cylinder <- smooth_qsm(cylinder) #> Smoothing QSM plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize QSM — standardize_qsm","title":"Standardize QSM — standardize_qsm","text":"Standardizes QSM variable names ordering across different QSM software","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize QSM — standardize_qsm","text":"","code":"standardize_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize QSM — standardize_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize QSM — standardize_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize QSM — standardize_qsm","text":"Renames supported QSM software output columns consistent. names lower case underscore delimited. See dictionary vignette detailed description column names. consistent QSM format ensures maximum compatibility analyzing QSMs made different software. function can run either update_cylinders function run, stage.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize QSM — standardize_qsm","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 28 variables: #> $ start_x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis_y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis_z : num 0.996 0.999 0.999 1 1 ... #> $ end_x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ raw_radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 32.8 32.7 32.6 32.6 32.6 ... #> $ base_distance : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ twig_distance : num 3.4 3.31 3.24 3.17 3.16 ... #> $ vessel_volume : num 279 271 266 260 259 ... #> $ pipe_area : int 82 82 82 82 82 82 82 82 82 82 ... #> $ pipe_radius : num 9.06 9.06 9.06 9.06 9.06 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 28 variables: #> $ start_x : num 0.761 0.759 0.771 0.768 0.765 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axis_y : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axis_z : num 0.996 0.963 0.998 0.999 0.998 ... #> $ end_x : num 0.759 0.771 0.768 0.765 0.769 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ raw_radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : num 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 31.4 31.4 31.3 31.3 31.2 ... #> $ base_distance : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ twig_distance : num 3.43 3.38 3.33 3.27 3.22 ... #> $ vessel_volume : num 237 233 229 226 222 ... #> $ pipe_area : int 69 69 69 69 69 69 69 69 69 69 ... #> $ pipe_radius : num 8.31 8.31 8.31 8.31 8.31 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 28 variables: #> $ start_x : num 0.763 0.77 0.77 0.763 0.764 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axis_y : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axis_z : num 0.98 0.991 0.959 0.992 0.973 ... #> $ end_x : num 0.77 0.77 0.763 0.764 0.766 ... #> $ end_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ raw_radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 34.2 34.2 34.2 34.1 34.1 ... #> $ base_distance : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ twig_distance : num 3.44 3.38 3.36 3.33 3.3 ... #> $ vessel_volume : num 416 409 406 403 400 ... #> $ pipe_area : int 121 121 121 121 121 121 121 121 121 121 ... #> $ pipe_radius : num 11 11 11 11 11 11 11 11 11 11 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Tree Metrics — tree_metrics","title":"Tree Metrics — tree_metrics","text":"Calculates tree metrics QSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tree Metrics — tree_metrics","text":"","code":"tree_metrics(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tree Metrics — tree_metrics","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tree Metrics — tree_metrics","text":"Returns list tree metric data frames synthetic point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tree Metrics — tree_metrics","text":"Calculates detailed tree, branch, segment metrics QSM. outputs include standard outputs TreeQSM, also additional variables, including, limited , growth length, reverse branch order, branch segment node relationships, distances twigs base tree, across various distribution metrics. Also included simulated point cloud tree, based QSM cylinder radii. corrected Real Twig, allow testing validation point cloud diameter overestimation throughout tree.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tree Metrics — tree_metrics","text":"TreeQSMrTwig growth_parameter1rTwig growth_parameter2rTwig treegraph2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tree Metrics — tree_metrics","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") cylinder <- import_qsm(file)$cylinder #> Importing TreeQSM cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\" ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":null,"dir":"Reference","previous_headings":"","what":"Twig Database — twigs","title":"Twig Database — twigs","text":"Database twig radii common North American tree species","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Twig Database — twigs","text":"","code":"twigs"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"twigs","dir":"Reference","previous_headings":"","what":"twigs","title":"Twig Database — twigs","text":"data frame containing twig radii measurements scientific_name tree's genus species radius_mm average twig radius millimeters n twig measurement sample size min minimum twig radii samples max maximum twig radii samples std standard deviation twig radii cv coefficient variation twig radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Cylinders — update_cylinders","title":"Update Cylinders — update_cylinders","text":"Updates QSM cylinder data preparation radii correction","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Cylinders — update_cylinders","text":"","code":"update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Cylinders — update_cylinders","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Cylinders — update_cylinders","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update Cylinders — update_cylinders","text":"Updates verifies parent-child cylinder relationships calculates new variables metrics found throughout supported QSM software. function required run rest rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Update Cylinders — update_cylinders","text":"growth_parameter1rTwig growth_parameter2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update Cylinders — update_cylinders","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 32 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 29 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 33 variables: #> $ startX : num 0.763 0.77 0.77 0.763 0.764 ... #> $ startY : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.77 0.77 0.763 0.764 0.766 ... #> $ endY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axisY : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axisZ : num 0.98 0.991 0.959 0.992 0.973 ... #> $ extension_ID : int 2 3 4 5 6 7 8 9 10 11 ... #> $ radius_cyl : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ volume : num 0.000333 0.000155 0.000149 0.000141 0.000147 ... #> $ axis_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ segment_ID : int 44 44 44 44 44 44 44 44 44 44 ... #> $ node_ID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branching_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ cyl_ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent_ID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ UnmodRadius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ branch_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growthLength : num 34.2 34.2 34.2 34.1 34.1 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ distanceFromBase : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ distanceToTwig : num 3.44 3.38 3.36 3.33 3.3 ... #> $ reversePipeAreaBranchorder : int 121 121 121 121 121 121 121 121 121 121 ... #> $ reversePipeRadiusBranchorder: num 11 11 11 11 11 11 11 11 11 11 ... #> $ vesselVolume : num 416 409 406 403 400 ... #> - attr(*, \".internal.selfref\")="},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.2.0","text":"cluster_cloud(): New function transfer QSM variables input point cloud simulate point cloud QSM. Efficient nearest neighbor searching done C++ nanoflann library: https://github.com/jlblancoc/nanoflann prune_qsm(): new function efficiently easily prune QSMs using multiple pruning criteria return options. aRchi QSMs now supported package. Users can now pass radius color column variables either unquoted quoted user facing functions like plot_qsm(), qsm_summary(), export_mesh(). Piping QSM cylinders functions allows user easily select unquoted columns. update_cylinders(): Three new allometric scaling variables standard outputs - vessel_volume, pipe_area, pipe_radius. plot_qsm(): Point clouds stem triangulation meshes can now plotted independently QSM. triangulation: user can now plot TreeQSM triangulation meshes passing triangulation list import_qsm(). user can also control color palette tri_color tri_palette. pan: right mouse button now pans plot instead zooming default. functionality mimics pan3d() RGL, rewritten Rcpp better responsiveness. lit: Enable disable plot lighting alpha: Set cylinder transparency. Note: can degrade performance large numbers cylinders facets. axes_color: axes color can now set user. skeleton_lwd: Set line width skeleton plots. normalize: Center cylinders around 0,0,0. Defaults FALSE. correct_radii(): broken branch filter can now disabled, broken_branch = FALSE Now returns modified, index cylinders modified Real Twig. run_rtwig(): broken branch filter can now disabled, broken_branch = FALSE","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-2-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.2.0","text":"~ 2 - 3x performance improvement! outlier broken branch filters rewritten Rcpp, massive performance gains. Parallel processing removed, eliminating overhead excessive memory usage. update_cylinders(): Fix bug path metrics SimpleForest QSMs (issue #4). Refactored tidyeval. Fix bug triangulation using correct ending cylinder. box_dimension(): 3D plot now pans right mouse button. run_rtwig(): Fix missing Treegraph parameter (issue #5). Fix bug start x,y,z values incorrect. Fix bug NA cylinder orientation values cause calculations fail. NA values removed user sees warning promoting check QSM. QSM network now cached temp folder avoid repeat calculations. Data checking helpful error messages now included every function. Add Real Twig Method paper citation package readme. New website look. Update vignettes. Update twig data base. Reduced package dependencies.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.2.0","text":"qsm_summary(): User can pass radius either quoted unquoted column name, longer default value. Failing provide radius throw error prompting user radius column name. correct_radii(): parallel processing removed, backend longer parameter. run_rtwig():parallel processing removed, backend longer parameter. file changed filename run_rtwig(), import_qsm(), import_treegraph() consistent functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-110","dir":"Changelog","previous_headings":"","what":"rTwig 1.1.0","title":"rTwig 1.1.0","text":"CRAN release: 2024-08-20","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.1.0","text":"run_rtwig(): New function run Real Twig method calculate tree metrics one simple function. standardize_qsm(): New function standardize variable names across supported QSM software. See dictionary vignette details variable names. tree_metrics(): New function calculate standard outputs TreeQSM, plus new variables, metrics, simulated point clouds reconstructed entirely QSM. Computationally expensive tasks implemented Rcpp maximum performance. import_treegraph(): New function import Treegraph QSM. Treegraph support implemented throughout package! update_cylinders(): New variables: distanceFromBase, distanceToTwig, branch_alt. QSM topology now verified corrected topological errors. plot_qsm() Complete refactor Rcpp tidyeval massive performance improvements New QSM skeleton plotting option Supports plotting multiple QSMs plot Cylinder cloud colors can now set random bg_color can change background color plot export_mesh() Complete refactor Rcpp tidyeval massive performance improvements Cylinder color parameter can now set random, FALSE disable exporting colors Note: color exporting fixed future rgl package update","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-1-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.1.0","text":"Implement Rcpp across package plot_qsm() > 10x performance improvement! smooth_qsm() > 10x performance improvement! export_mesh() > 10x performance improvement! box_dimension() ~ 3x performance improvement update_cylinder() ~2x performance improvement better vectorization Cleaned variable names removed repeat calculations Verify correct QSM topology Reduced package dependencies Cleanup function imports Update twig data base Update vignettes Update citations","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.1.0","text":"parent child cylinder IDs, nodes, branches begin numbering 1 ensure compatibility R indexing igraph. affects SimpleForest Treegraph. Redefined SimpleForest branch structure begin new branch order end twig. ensures consistency code calculations TreeQSM, Treegraph, SimpleForest. old branch definition saved new variable called branch_alt, changed begin zero consistent new branch_alt variable Real Twig. Renamed twigRad function parameter twig_radius consistent tidy style guidelines Renamed GrowthLength growthLength consistent SimpleForest Variable names qsm_summary() updated explicit consistent outputs tree_metrics() plot_qsm() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. export_mesh() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. plot_stand() deprecated functionality now incorporated plot_qsm() twigs: renamed scientific.name scientific_name radius.mm radius_mm consistent naming conventions across package.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-102","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.2","title":"rTwig 1.0.2","text":"CRAN release: 2024-04-08 Reduced package size Allow user run examples Small text formatting changes Vignette webpage typo fixes Improved treedata import import_qsm()","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-101","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.1","title":"rTwig 1.0.1","text":"Initial CRAN Submission","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-100","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.0","title":"rTwig 1.0.0","text":"Initial release Real Twig!","code":""}] +[{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://aidanmorales.github.io/rTwig/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Box-Dimension","text":"Box dimension measure structural complexity object. grounded theoretical fractal analysis applied three-dimensional point cloud data. method uses box counting (appropriately voxel counting), relationship total number boxes needed contain point cloud box size structural complexity point cloud. Box dimension slope simple linear equation log number boxes, log inverse box size. larger R-squared value indicates self similarity point cloud. Box dimension ranges 1 (line) 3 (solid cube). box dimension 2.72 special object known Menger sponge, zero volume infinite surface area. individual trees box dimension 1 2.2. Box dimension sensitive resolution level occlusion point cloud. low resolution can lead oversimplification, much occlusion can lead boxes used contain cloud box size decreases. good quality point cloud low occlusion resolution 0-1 cm optimal calculating box dimension.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Box-Dimension","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Box-Dimension","text":"first step load rTwig package.","code":"library(rTwig)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"load-point-cloud","dir":"Articles","previous_headings":"","what":"Load Point Cloud","title":"Box-Dimension","text":"Now need load point cloud. Box dimension can run point cloud, single trees, entire forest stands. Let’s use example Kentucky coffee tree.","code":"file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"box-dimension","dir":"Articles","previous_headings":"","what":"Box Dimension","title":"Box-Dimension","text":"Now can calculate box dimension point cloud box_dimension function. need specify location x, y, z coordinates, defaults first three columns point cloud data frame. can also set lower cutoff, smallest box size. Since point cloud resolution 1 cm, set lowercutoff parameter 0.01 m, also default. Let’s take look summary data extract box dimension (slope).","code":"# Box Dimension Summary output <- box_dimension(cloud) str(output) #> List of 2 #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 9 obs. of 2 variables: #> ..$ log.box.size: num [1:9] 0 0.693 1.386 2.079 2.773 ... #> ..$ log.voxels : num [1:9] 1.1 1.95 3.09 4.11 5.18 ... #> ..- attr(*, \".internal.selfref\")= #> $ :Classes 'tidytable', 'tbl', 'data.table' and 'data.frame': 1 obs. of 4 variables: #> ..$ r.squared : num 1 #> ..$ adj.r.squared: num 1 #> ..$ intercept : num 1.02 #> ..$ slope : num 1.48 # Box Dimension (slope) output[[2]]$slope #> [1] 1.483312"},{"path":"https://aidanmorales.github.io/rTwig/articles/Box-Dimension.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Box-Dimension","text":"can also plot results 2D 3D plots, setting plot parameter 2D, 3D . plot parameter set FALSE default speed calculations.","code":"# 2D Plot output <- box_dimension(cloud, plot = \"2D\") # 3D Plot output <- box_dimension(cloud, plot = \"3D\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Dictionary","text":"Real Twig allows QSM variable names standardized across TreeQSM, SimpleForest, Treegraph, aRchi. done standardize_qsm() function, creates consistent experience working QSMs. detailed definitions variable names using rTwig QSM format.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"cylinder-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Cylinder Attributes","title":"Dictionary","text":"start: defines x, y, z coordinates center cylinder’s base. axis: defines x, y, z axis formed cylinder’s base top. end: defines x, y, z coordinates center cylinder’s top. id: first cylinder id 1 base tree. largest id value equal number rows data frame. parent: shows relationships individual cylinders QSM. parent first cylinder always zero, base tree parent. Within branch, parent cylinders always one less child. base branch, parent cylinder cylinder branch connected . radius: radius cylinder meters. raw_radius: radius cylinder possible modifications. using TreeQSM, always UnmodRadius column. using SimpleForest Treegraph, copy radius Real Twig run. Real Twig always uses radius corrections. modified: average index cylinder radius outlier modified Real Twig across QSM paths. value 0 indicates cylinder never modified path, value 1 indicates modified every path. value 0 1 modified , paths. length: length cylinder meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"branch-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Branch Attributes","title":"Dictionary","text":"branch: branch defined starting new branch order continuing twig reached. definition TreeQSM Treegraph use. SimpleForest branches converted definition standardizing QSM. first branch always main stem rTwig format. Treegraph QSMs retain definition branches. TreeQSM SimpleForest numbered consecutively order cylinder ids. branch_position: index cylinder’s position within branch. TreeQSM’s PositionInBranch definition. first position always base branch, last position always twig branch end case broken branch. branch_order: order every branch. smallest branch order zero always main stem. First order branches connected main stem, forth higher order branches. new branch order always begins new branching fork, continues twig end broken branch, one greater parent order. definition consistent TreeQSM, SimpleForest, Treegraph, rTwig format always defines main stem order zero consistency. reverse_order: reverse branch order (RBO). Traditional branch ordering relative main stem, tell us anything position size branch. Small twigs large branches can first order branches connected main stem traditional definition. RBO solves problem considering relative position branches within QSM. RBO assigns value one end twigs broken branches, works backwards base tree reached, assigned highest RBO. RBO branch maximum segment (internode) depth relative twigs tree. branch_alt: alternate branch index. Alternate branch zero always main stem. rest branches first order branches children. similar cutting first order branches saw labeling consecutively. using SimpleForest QSM, old branchID column updated main stem index zero.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"segment-attributes","dir":"Articles","previous_headings":"Dictionary","what":"Segment Attributes","title":"Dictionary","text":"segment: segment (internode) portion tree branching forks (nodes). new segment begins every branch fork. Cylinders part segment cylinder one child new segment created. rTwig format always defines base tree first segment. parent_segment: shows relationships segments QSM. parent segment first segment always zero, first segment (base tree) parent segment. parent segment node current segment forked . total_children: total number cylinders supported given cylinder. useful find branches fork. value one means branching forks. value two means one branching fork, etc.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Dictionary.html","id":"additional-metrics","dir":"Articles","previous_headings":"Dictionary","what":"Additional Metrics","title":"Dictionary","text":"growth_length: growth length meters given cylinder. Growth length can defined sum lengths cylinders supported given cylinder. can visualize growth length cutting tree saw given point. cumulative length cut portion growth length part tree cut. growth length base tree sum lengths cylinders QSM. growth length twig simply length cylinder. Growth length reflects measurement taken real tree, easier obtain QSMs. base_distance: distance meters given cylinder base tree. distance calculated taking simplest complete path given cylinder base tree. twig_distance: average distance meters given cylinder away supported twigs. calculated finding complete simple paths given cylinder supported twigs, summing lengths, dividing number paths. vessel_volume: theoretical cumulative volume living vessels supported given cylinder based allometric scaling theory. sum pipe_area * length supported cylinders. pipe_area: theoretical cross-sectional area given cylinder based allometric scaling theory. units values total number supported twigs. pipe_radius: theoretical radius given cylinder based allometric scaling theory. units values square root total number supported twigs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Metrics","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr, tidyr, ggplot packages help data manipulation visualization, ggpubr multi-panel plots, rgl point cloud plotting.","code":"devtools::install_github(\"https://github.com/aidanmorales/rTwig\") # Load rTwig library(rTwig) # Other useful packages library(rgl) library(tidyr) library(dplyr) library(ggplot2) library(ggpubr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"run-real-twig-calculate-metrics","dir":"Articles","previous_headings":"","what":"Run Real Twig & Calculate Metrics","title":"Metrics","text":"Next, let’s run Real Twig run_rtwig() calculate tree metrics tree_metrics().","code":"# File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Run Real Twig cylinder <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) # Calculate detailed tree metrics metrics <- tree_metrics(cylinder)"},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"point-cloud","dir":"Articles","previous_headings":"Run Real Twig & Calculate Metrics","what":"Point Cloud","title":"Metrics","text":"can even plot simulated point cloud rgl library, look cylinder connectivity.","code":"plot_qsm(cylinder, qsm$cylinder, cloud = metrics$cloud, skeleton = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Metrics.html","id":"plotting-code","dir":"Articles","previous_headings":"","what":"Plotting Code","title":"Metrics","text":"","code":"# Stem Taper ------------------------------------------------------------------- metrics$stem_taper %>% ggplot(aes(x = height_m, y = diameter_cm)) + geom_point() + stat_smooth(method = \"loess\", color = \"black\", formula = y ~ x) + theme_classic() + labs( title = \"Stem Taper\", x = \"Height (m)\", y = \"Diameter (cm)\" ) # Tree Metrics ----------------------------------------------------------------- # Tree Height Distributions metrics$tree_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Tree Diameter Distributions metrics$tree_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Tree Zenith Distributions metrics$tree_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Tree azimuth distributions metrics$tree_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + theme_classic() + facet_wrap(~type) + theme(legend.position = \"right\") # Branch Metrics --------------------------------------------------------------- # Branch diameter distributions metrics$branch_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Branch height distributions metrics$branch_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Branch angle distributions metrics$branch_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch zenith distributions metrics$branch_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch azimuth distributions metrics$branch_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Branch order distributions metrics$branch_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = branch_order, y = value, color = branch_order, fill = branch_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Branch Order Distributions\", x = \"\", y = \"\", fill = \"Branch Order\", color = \"Branch Order\" ) + facet_wrap(~type) + # Segment Metrics -------------------------------------------------------------- # Segment diameter distributions metrics$segment_diameter_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = diameter_class_cm, y = value, color = diameter_class_cm, fill = diameter_class_cm )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Diameter Distributions\", x = \"\", y = \"\", fill = \"Diameter Class (cm)\", color = \"Diameter Class (cm)\" ) + facet_wrap(~type) + theme_classic() # Segment height distributions metrics$segment_height_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = height_class_m, y = value, color = height_class_m, fill = height_class_m )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Height Distributions\", x = \"\", y = \"\", fill = \"Height Class (m)\", color = \"Height Class (m)\" ) + facet_wrap(~type) + theme_classic() # Segment angle distributions metrics$segment_angle_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = angle_class_deg, y = value, color = angle_class_deg, fill = angle_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Angle Distributions\", x = \"\", y = \"\", fill = \"Angle Class (deg)\", color = \"Angle Class (deg)\" ) + facet_wrap(~type) + # Segment zenith distributions metrics$segment_zenith_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = zenith_class_deg, y = value, color = zenith_class_deg, fill = zenith_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Zenith Distributions\", x = \"\", y = \"\", fill = \"Zenith Class (deg)\", color = \"Zenith Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment azimuth distributions metrics$segment_azimuth_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes( x = azimuth_class_deg, y = value, color = azimuth_class_deg, fill = azimuth_class_deg )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Segment Azimuth Distributions\", x = \"\", y = \"\", fill = \"Azimuth Class (deg)\", color = \"Azimuth Class (deg)\" ) + facet_wrap(~type) + theme_classic() # Segment order distributions metrics$segment_order_dist %>% mutate(volume_L = volume_m3 * 1000) %>% select(-volume_m3) %>% relocate(volume_L, .before = area_m2) %>% pivot_longer(cols = 3:5, names_to = \"type\") %>% ggplot(aes( x = reverse_order, y = value, color = reverse_order, fill = reverse_order )) + geom_bar(stat = \"identity\", position = \"dodge2\") + labs( title = \"Reverse Order Distributions\", x = \"\", y = \"\", fill = \"Reverse Order\", color = \"Reverse Order\" ) + facet_wrap(~type) + theme_classic() # Spreads ---------------------------------------------------------------------- spreads <- metrics$spreads # Generate colors from red to blue n <- length(unique(spreads$height_class)) colors <- data.frame(r = seq(0, 1, length.out = n), g = 0, b = seq(1, 0, length.out = n)) # Convert colors to hex color_hex <- apply(colors, 1, function(row) { rgb(row[1], row[2], row[3]) }) # Assign colors to height classes height_class_colors <- data.frame( height_class = unique(spreads$height_class), color = color_hex ) spreads %>% left_join(height_class_colors, by = \"height_class\") %>% ggplot(aes(x = azimuth_deg, y = spread_m, group = height_class, color = color)) + geom_line() + scale_color_identity() + coord_polar(start = 0) + labs(x = \"\", y = \"\") + theme_minimal() + theme(axis.text.y = element_blank()) # Vertical profile ------------------------------------------------------------- metrics$spreads %>% group_by(height_class) %>% summarise( max = max(spread_m), mean = mean(spread_m), min = min(spread_m) ) %>% pivot_longer(cols = 2:4, names_to = \"type\") %>% ggplot(aes(x = height_class, y = value, color = type)) + geom_line() + labs( x = \"Height Class\", y = \"Spread (m)\", color = \"\" ) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Overview","text":"Real Twig designed tested using QSMs created TreeQSM modeling software. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume within ± 10% real tree volume. given QSM provides parent-child cylinder relationships, Real Twig work, case SimpleForest, Treegraph, aRchi software packages. high quality point clouds, QSMs proper input settings, species specific twig diameter measurements supplied, can expect get good estimates tree volume across multiple different software packages. Real Twig can provide excellent tree volume estimates, can transform poor quality data good data. general rule thumb, closer QSM resembles actual tree correction, better results correction. Real Twig performs best topology tree correct, cylinder sizes main sources QSM error. Errors QSM topology become readily apparent correction, Real Twig can also used visually validate QSM topology without reference data.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Overview","text":"first step load rTwig package. Real Twig works well paired packages Tidyverse, also load dplyr package help data manipulation.","code":"# Load rTwig library(rTwig) # Other useful packages library(dplyr)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"import-qsm","dir":"Articles","previous_headings":"","what":"Import QSM","title":"Overview","text":"rTwig supports available versions TreeQSM, v2.0 v2.4.1 time writing. important note legacy versions TreeQSM (v2.0) store data much different format modern versions (v2.3.0-2.4.1). strongly advised use latest version TreeQSM rTwig best QSM topology volume estimates. Older versions can used, QSM topology poor, volume underestimation almost guaranteed. Regardless version TreeQSM MATLAB used, import_qsm() function import QSM (.mat extension) convert data format usable R. user must specify version TreeQSM using version parameter. rTwig automatically defaults use new TreeQSM format, older format can imported version = \"2.0\". import_qsm() also imports QSM information, including cylinder, branch, treedata, rundata, pmdistance, triangulation data, stored together list. SimpleForest exports QSMs .csv files, easy load R using built read.csv() function. QSM contains thousands cylinders, much faster use fread() function data.table package take advantage multi-threaded support. Treegraph exports QSMs .json files. import R, can use import_treegraph() function quickly load Treegraph QSM. aRchi built R, provided function import data. Users can extract aRchi cylinder data aRchi::get_QSM() running rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-1-treeqsm-v2-3-0---2-4-1","dir":"Articles","previous_headings":"Import QSM","what":"Example 1: TreeQSM v2.3.0 - 2.4.1","title":"Overview","text":"can import QSM supplying import_qsm() function directory QSM. QSM list six elements. can check follows: Let’s check version TreeQSM used, date QSM made, take look cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Import and save QSM qsm <- import_qsm(file) summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list # QSM info qsm$rundata$version #> [1] \"2.4.1\" qsm$rundata$start.date #> [1] \"2023-12-06 10:14:31 UTC\" # Number of cylinders str(qsm$cylinder) #> 'data.frame': 1136 obs. of 17 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ parent : int 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 2 3 4 5 6 7 8 9 10 11 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: int 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-2-treeqsm-v2-0","dir":"Articles","previous_headings":"Import QSM","what":"Example 2: TreeQSM v2.0","title":"Overview","text":"Let’s try importing old QSM check structure.","code":"# QSM Directory file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") # Import and save QSM qsm2 <- import_qsm(file, version = \"2.0\") # QSM Info summary(qsm2) #> Length Class Mode #> cylinder 15 data.frame list #> treedata 33 -none- list str(qsm2$cylinder) #> 'data.frame': 1026 obs. of 15 variables: #> $ radius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ length : num 0.335 0.283 0.272 0.244 0.267 ... #> $ start.x : num 8.4 8.43 8.44 8.47 8.5 ... #> $ start.y : num 47.7 47.7 47.7 47.8 47.8 ... #> $ start.z : num 2.23 2.57 2.85 3.12 3.36 ... #> $ axis.x : num 0.1103 0.0531 0.0878 0.1666 0.0894 ... #> $ axis.y : num 0.0337 0.0296 0.1282 0.0801 0.061 ... #> $ axis.z : num 0.993 0.998 0.988 0.983 0.994 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : num 1 2 3 4 5 6 7 8 9 10 ... #> $ added : int 0 0 0 0 0 0 0 0 0 0 ... #> $ UnmodRadius : num 0.0612 0.056 0.0553 0.0552 0.0534 ... #> $ branch : num 1 1 1 1 1 1 1 1 1 1 ... #> $ BranchOrder : num 0 0 0 0 0 0 0 0 0 0 ... #> $ PositionInBranch: num 1 2 3 4 5 6 7 8 9 10 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"example-3-simpleforest","dir":"Articles","previous_headings":"Import QSM","what":"Example 3: SimpleForest","title":"Overview","text":"Let’s take look SimpleForest cylinder data.","code":"# QSM directory file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Import and save QSM cylinder data cylinder <- read.csv(file) str(cylinder) #> 'data.frame': 1149 obs. of 17 variables: #> $ ID : int 0 1 2 3 4 5 6 7 8 9 ... #> $ parentID : int -1 0 1 2 3 4 5 6 7 8 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance: num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parentSegmentID : int -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branchID : int 0 0 0 0 0 0 0 0 0 0 ..."},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"cylinder-data","dir":"Articles","previous_headings":"","what":"Cylinder Data","title":"Overview","text":"Next, update parent-child ordering cylinder data allow path analysis add new QSM variables. important QSM variable growth length. Growth length cumulative length metric, growth length cylinder length, plus lengths children. gives us perfect ordering along branch path, highest growth length equal base tree, twigs growth length equal cylinder length. also important note number twigs QSM always equal number paths QSM, since path goes base tree twig tip. also calculate several additional variables improve QSM analysis visualization. reverse branch order (RBO) assigns order 1 twigs, works backwards base main stem, highest RBO. RBO essentially maximum node depth given branch segment (area branching forks). RBO problematic twig cylinders easy identify. distance cylinder base, average distance cylinder supported twigs new ways help visualize problematic cylinders. Let’s save cylinders new variable make easier work update ordering.","code":"# Save cylinders to new object cylinder <- qsm$cylinder # Update cylinder data cylinder <- update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"topology","dir":"Articles","previous_headings":"","what":"Topology","title":"Overview","text":"correct QSM, often worthwhile check quality QSM plotting input point cloud. , load point cloud save data frame, first three columns x, y, z columns. use plot_qsm() function . want check raw cylinder fits possible modification, use raw cylinder radii.","code":"# Load the input point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) # Plot the qsm and point cloud plot_qsm(cylinder = cylinder, cloud = cloud, radius = \"UnmodRadius\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"twig-diameters","dir":"Articles","previous_headings":"","what":"Twig Diameters","title":"Overview","text":"can correct QSM radii, need know real twig diameter . example tree, species Kentucky coffee tree (Gymnocladus dioicus), nice, stout twigs. rTwig comes data base twigs can called typing twigs data set. data set includes average twig radius, min max radius, standard deviation, coefficient variation. Let’s look twig data set find twig diameter Kentucky coffee tree.","code":"# Look at the twigs database twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows # Find our species filter(twigs, scientific_name == \"Gymnocladus dioicus\") #> # A tibble: 1 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Gymnocladus dioicus 4.23 30 2.79 6.6 0.87 0.2"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"summary-metrics","dir":"Articles","previous_headings":"","what":"Summary Metrics","title":"Overview","text":"correct QSM, Let’s take look current metrics, can compare tree volume correction. can qsm_summary() function. stem triangulation enabled TreeQSM, can use better represent main stem volume cases, especially large buttress flares. can also make plot radius versus growth length see much overestimation twig radii. Looking diagnostic plot log log scale, measured twig radius horizontal line, can see nearly twig radii overestimated, increasing radii variation growth length approaches zero. Except main stem, clear pattern individual branch tapering.","code":"# QSM summary qsm_summary(cylinder = cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.644 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 # QSM summary with Triangulation qsm_summary(cylinder = cylinder, radius = radius, triangulation = qsm$triangulation)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"correct-radii","dir":"Articles","previous_headings":"","what":"Correct Radii","title":"Overview","text":"Now can correct QSM cylinder radii correct_radii() function. step, model path tree separately, poorly fit cylinders identified removed, GAM fit, intercept measured twig radius, growth length predicts cylinder radius. Let’s correct cylinder radii Kentucky coffee tree look new volume estimates diagnostic plots. can see reduced volume QSM around 3 liters, around 15% overestimation volume correction. Kentucky coffee tree relatively large twigs, overestimation severe tree much smaller twigs, can upwards >200% overestimation cases. Looking diagnostic plot, can see individual branches can clearly identified unique allometry. Notice nearly volume reduction occurred higher order branches, main stem remaining nearly unchanged. branches now taper towards measured twig radius Kentucky coffee tree. Getting real twig diameter critical, high value overestimate volume, low value underestimate total volume, underestimate proportional number twigs small branches tree. species available database, found genus level twig radius average good substitute.","code":"# Correct cylinder radii cylinder <- correct_radii(cylinder, twig_radius = 4.23) # Corrected QSM summary qsm_summary(cylinder, radius = radius)[[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 10.8 0.640 #> 2 1 5.20 0.754 #> 3 2 2.69 0.583 #> 4 3 0.539 0.170 #> 5 4 0.104 0.0431 #> 6 5 0.00683 0.00308"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Overview","text":"Optionally, can smooth QSM ensuring cylinders connected. visual change affect volume estimates. can smooth_qsm() function, plot results plot_qsm() function. different colors different branch orders. can also color QSM many different variables palettes. See plot_qsm() documentation details. can also save QSM mesh (.ply extension) use modeling programs export_mesh() function. colors palettes found plot_qsm() function can used color mesh.","code":"# Smooth QSM cylinder <- smooth_qsm(cylinder) # Plot QSM plot_qsm(cylinder) # QSM Custom Colors & Piping cylinder %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"magma\" ) # Plot Twigs Colored by Unique Segment cylinder %>% filter(reverseBranchOrder == 1) %>% plot_qsm( radius = \"radius\", cyl_color = \"reverseBranchOrder\", cyl_palette = \"rainbow\" ) # Export Mesh Colored by RBO cylinder %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"magma\" ) # Export Twigs Colored by Unique Segments cylinder %>% filter(reverseBranchOrder == 1) %>% export_mesh( filename = \"QSM_mesh\", radius = \"radius\", color = \"reverseBranchOrder\", palette = \"rainbow\" )"},{"path":"https://aidanmorales.github.io/rTwig/articles/Overview.html","id":"workflow-best-practices","dir":"Articles","previous_headings":"","what":"Workflow & Best Practices","title":"Overview","text":"overview typical rTwig processing chain. dealing multiple trees, advise creating master data frame tidy format, unique tree row, columns tree id, directory QSM .mat file, species twig diameter, can tailored workflow needs. simple matter looping master data frame, correcting tree, saving results master list. Make sure read function’s documentation examples unique features.","code":"# Import QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Real Twig Main Steps cylinder <- run_rtwig(file, twig_radius = 4.23) # Tree Metrics metrics <- tree_metrics(cylinder) # Plot Results plot_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Twigs","text":"Twigs smallest ground woody component tree. Twigs responsible supporting delicate tissues needed grow leaves protect buds dormant season. twig measurements basis Real Twig method, publicly available databases twigs limited, present database twig measurements wide range tree genera species.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Twigs","text":"can install package directly CRAN: latest development version GitHub:","code":"install.packages(\"rTwig\") devtools::install_github(\"https://github.com/aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"load-packages","dir":"Articles","previous_headings":"","what":"Load Packages","title":"Twigs","text":"first step load rTwig package.","code":"library(rTwig) #> Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display #> Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. # Useful packages library(dplyr) library(ggplot2)"},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"twig-database","dir":"Articles","previous_headings":"","what":"Twig Database","title":"Twigs","text":"twig database built directly rTwig can called follows: database broken 7 different columns. scientific_name specific epithet. Genus spp. average species genus. radius_mm twig radius millimeters. species, n number unique twig samples taken, min minimum twig radius, max max twig radius, std standard deviation, cv coefficient variation. Let’s see breakdown species.","code":"# If the rTwig library has been loaded twigs # If rTwig hasn't been loaded, but just the twigs are needed rTwig::twigs #> # A tibble: 104 × 7 #> scientific_name radius_mm n min max std cv #> #> 1 Abies concolor 1.43 21 0.89 1.9 0.28 0.19 #> 2 Abies spp. 1.43 21 0.89 1.9 0.28 0.19 #> 3 Acer platanoides 1.39 30 0.89 2.03 0.3 0.21 #> 4 Acer rubrum 1.18 30 0.89 1.52 0.16 0.14 #> 5 Acer saccharinum 1.41 14 0.89 1.9 0.27 0.2 #> 6 Acer saccharum 1.2 30 0.89 1.65 0.23 0.19 #> 7 Acer spp. 1.29 104 0.89 2.03 0.23 0.18 #> 8 Aesculus flava 2.96 14 2.29 4.44 0.58 0.19 #> 9 Aesculus spp. 2.96 14 2.29 4.44 0.58 0.19 #> 10 Betula nigra 0.85 30 0.51 1.52 0.23 0.27 #> # ℹ 94 more rows unique(twigs$scientific_name) #> [1] \"Abies concolor\" \"Abies spp.\" #> [3] \"Acer platanoides\" \"Acer rubrum\" #> [5] \"Acer saccharinum\" \"Acer saccharum\" #> [7] \"Acer spp.\" \"Aesculus flava\" #> [9] \"Aesculus spp.\" \"Betula nigra\" #> [11] \"Betula spp.\" \"Carya cordiformis\" #> [13] \"Carya ovata\" \"Carya spp.\" #> [15] \"Castanea dentata\" \"Castanea spp.\" #> [17] \"Cercis canadensis\" \"Cercis spp.\" #> [19] \"Cladrastis kentukea\" \"Cladrastis spp.\" #> [21] \"Cornus mas\" \"Cornus officinalis\" #> [23] \"Cornus spp.\" \"Crataegus spp.\" #> [25] \"Fagus grandifolia\" \"Fagus spp.\" #> [27] \"Fagus sylvatica\" \"Fraxinus americana\" #> [29] \"Fraxinus pennsylvanica\" \"Fraxinus quadrangulata\" #> [31] \"Fraxinus spp.\" \"Ginkgo biloba\" #> [33] \"Ginkgo spp.\" \"Gleditsia spp.\" #> [35] \"Gleditsia triacanthos\" \"Gymnocladus dioicus\" #> [37] \"Gymnocladus spp.\" \"Gymnopodium floribundum\" #> [39] \"Gymnopodium spp.\" \"Juglans cinerea\" #> [41] \"Juglans nigra\" \"Juglans spp.\" #> [43] \"Laguncularia racemosa\" \"Laguncularia spp.\" #> [45] \"Larix laricina\" \"Larix spp.\" #> [47] \"Liquidambar spp.\" \"Liquidambar styraciflua\" #> [49] \"Liriodendron spp.\" \"Liriodendron tulipifera\" #> [51] \"Magnolia acuminata\" \"Magnolia spp.\" #> [53] \"Malus spp.\" \"Metasequoia glyptostroboides\" #> [55] \"Metasequoia spp.\" \"Nyssa spp.\" #> [57] \"Nyssa sylvatica\" \"Ostrya spp.\" #> [59] \"Ostrya virginiana\" \"Phellodendron amurense\" #> [61] \"Phellodendron spp.\" \"Picea abies\" #> [63] \"Picea omorika\" \"Picea pungens\" #> [65] \"Picea spp.\" \"Pinus nigra\" #> [67] \"Pinus spp.\" \"Pinus strobus\" #> [69] \"Platanus acerifolia\" \"Platanus occidentalis\" #> [71] \"Platanus spp.\" \"Populus deltoides\" #> [73] \"Populus spp.\" \"Prunus serotina\" #> [75] \"Prunus spp.\" \"Prunus virginiana\" #> [77] \"Quercus acutissima\" \"Quercus alba\" #> [79] \"Quercus bicolor\" \"Quercus coccinea\" #> [81] \"Quercus ellipsoidalis\" \"Quercus imbricaria\" #> [83] \"Quercus macrocarpa\" \"Quercus michauxii\" #> [85] \"Quercus muehlenbergii\" \"Quercus palustris\" #> [87] \"Quercus robur\" \"Quercus rubra\" #> [89] \"Quercus shumardii\" \"Quercus spp.\" #> [91] \"Quercus velutina\" \"Rhizophora mangle\" #> [93] \"Rhizophora spp.\" \"Thuja occidentalis\" #> [95] \"Thuja spp.\" \"Tilia americana\" #> [97] \"Tilia spp.\" \"Tilia tomentosa\" #> [99] \"Tsuga canadensis\" \"Tsuga spp.\" #> [101] \"Ulmus americana\" \"Ulmus pumila\" #> [103] \"Ulmus rubra\" \"Ulmus spp.\""},{"path":"https://aidanmorales.github.io/rTwig/articles/Twigs.html","id":"visualization","dir":"Articles","previous_headings":"","what":"Visualization","title":"Twigs","text":"Let’s visualize twig data!","code":"# Lets look at a subset of oak species twigs %>% filter(grepl(\"Quercus\", scientific_name)) %>% ggplot(aes(x = scientific_name, y = radius_mm, color = scientific_name)) + geom_point(aes(size = n)) + geom_errorbar(aes(ymax = max, ymin = min)) + coord_flip() + labs( title = \"Quercus Twig Radii\", x = \"\", y = \"Twig Radius (mm)\", color = \"Species\", size = \"Sample Size\" ) + scale_x_discrete(limits = rev) + theme_classic()"},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-4-1","dir":"Articles","previous_headings":"","what":"TreeQSM v2.4.1","title":"Validation","text":"mass estimates statistics using TreeQSM v2.4.1 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"treeqsm-v2-3-0","dir":"Articles","previous_headings":"","what":"TreeQSM v2.3.0","title":"Validation","text":"mass estimates statistics using TreeQSM v2.3.0 built tapering Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/articles/Validation.html","id":"simpleforest","dir":"Articles","previous_headings":"","what":"SimpleForest","title":"Validation","text":"important note Real Twig tested SimpleForest development. Real Twig improve volume estimates SimpleForest versus built allometric corrections, still improvements made, SimpleForest QSM cylinders generally much overestimated TreeQSM cylinders, making identification “good” cylinders difficult. mass estimates statistics using SimpleForest v5.3.2 built vessel volume correction, Real Twig applied QSMs.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Aidan Morales. Author, maintainer, copyright holder. David W. MacFarlane. Author, copyright holder.","code":""},{"path":"https://aidanmorales.github.io/rTwig/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Morales , MacFarlane D (2023). rTwig: Realistic Quantitative Structure Models. R package version 1.2.0, https://github.com/aidanmorales/rTwig, https://aidanmorales.github.io/rTwig/. Morales , MacFarlane D (2024). “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 1-16. doi:10.1093/forestry/cpae046.","code":"@Manual{, title = {rTwig: Realistic Quantitative Structure Models}, author = {Aidan Morales and David W. MacFarlane}, year = {2023}, note = {R package version 1.2.0, https://github.com/aidanmorales/rTwig}, url = {https://aidanmorales.github.io/rTwig/}, } @Article{, title = {Reducing tree volume overestimation in quantitative structure models using modeled branch topology and direct twig measurements}, author = {Aidan Morales and David W. MacFarlane}, journal = {Forestry: An International Journal of Forest Research}, year = {2024}, pages = {1-16}, doi = {https://doi.org/10.1093/forestry/cpae046}, }"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Realistic Quantitative Structure Models","text":"Real Twig method correct unrealistic cylinders quantitative structure models (QSMs), different traditional allometric statistical corrections. Small branch twig cylinders overestimated QSMs due technical limitations current LiDAR sensor technology. Real Twig overcomes limitations using real direct twig diameter measurements corresponding tree species inform individual path taper models QSM. Real Twig dynamically identifies realistic cylinders QSM using network analysis, general additive models, direct twig measurements, model correct unrealistic cylinders high degree precision accuracy vetted ground truth reference data. Real Twig method presented R package, rTwig. rTwig includes novel database twig diameter measurements many common North American European trees, make method immediately accessible user. addition, rTwig includes fast efficient tools QSM visualization analysis seamlessly compatible R ecosystem, point cloud fractal analysis visualization using box-dimension metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"method","dir":"","previous_headings":"","what":"Method","title":"Realistic Quantitative Structure Models","text":"complete description validation Real Twig can read : Aidan Morales, David W. MacFarlane. “Reducing tree volume overestimation quantitative structure models using modeled branch topology direct twig measurements.” Forestry: International Journal Forest Research, 2024, pp. 1-16. https://doi.org/10.1093/forestry/cpae046.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"realistic-trees","dir":"","previous_headings":"Features","what":"Realistic Trees","title":"Realistic Quantitative Structure Models","text":"main goal Real Twig correct volume overestimation QSMs caused limitations LiDAR sensors better non-destructive ground biomass (AGB) estimates. Real Twig incorporates direct twig measurement QSM, resulting models accurate volume metrics, also visually realistic, independent tree species size. example, shown 300+ year old white oak tree (Quercus alba), without Real Twig.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"efficient-visualization","dir":"","previous_headings":"Features","what":"Efficient Visualization","title":"Realistic Quantitative Structure Models","text":"plot_qsm() can plot QSMs point clouds, using rgl 3D display, C++ via Rcpp efficiently build cylinders. cylinders, simulated point cloud, skeleton can plotted colored variable user supplied color palette. can also visualize stem triangulation meshes TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"detailed-tree-metrics","dir":"","previous_headings":"Features","what":"Detailed Tree Metrics","title":"Realistic Quantitative Structure Models","text":"goal rTwig provide users tools visualize analyze QSM metrics without tied particular QSM software. end, standardize_qsm() provides consistent naming convention supported QSMs, making easy combine analyze QSMs different sources. tree_metrics() calculates major QSM metrics supported software. prune_qsm() can virtually prune tree using multiple input parameters. cluster_cloud() can transfer QSM metrics directly onto unorganized point cloud, simulate virtual point cloud. See vignettes function reference pages details.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"supported-software","dir":"","previous_headings":"Features","what":"Supported Software","title":"Realistic Quantitative Structure Models","text":"rTwig currently supports TreeQSM, SimpleForest, Treegraph, aRchi","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"functions","dir":"","previous_headings":"","what":"Functions","title":"Realistic Quantitative Structure Models","text":"run_rtwig() runs Real Twig method QSM import_qsm() imports QSM created TreeQSM (.mat) import_treegraph() imports QSM created Treegraph (.json) standardize_qsm() standardizes QSM variable names across supported software update_cylinders() updates cylinder relationships adds new QSM variables correct_radii models QSM paths corrects cylinder radii tree_metrics() generates detailed tree metrics simulated point cloud cluster_cloud() transfers QSM variables point cloud simulates point cloud qsm_summary() summarises QSM diameter, height, volume, surface area smooth_qsm() connects cylinder end--end smooth branch visualization plot_qsm() plots QSMs optionally point clouds prune_qsm() prunes QSM cylinder attributes, height, diameter classes export_mesh() exports QSM mesh object (.ply) export_mat() exports QSM MATLAB format (.mat) box_dimension() calculates visualizes structural complexity point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Realistic Quantitative Structure Models","text":"can install released version rTwig CRAN : can install development version rTwig GitHub :","code":"install.packages(\"rTwig\") # install.packages(\"devtools\") devtools::install_github(\"aidanmorales/rTwig\")"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-real-twig","dir":"","previous_headings":"Installation","what":"Quick Start: Real Twig","title":"Realistic Quantitative Structure Models","text":"examples quickly run visualize Real Twig, using example data package. See vignettes details general workflow best practices.","code":""},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treeqsm","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"TreeQSM","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"simpleforest","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"SimpleForest","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"treegraph","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"Treegraph","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- \"path_to_treegraph_json\" # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"archi","dir":"","previous_headings":"Installation > Quick Start: Real Twig","what":"aRchi","title":"Realistic Quantitative Structure Models","text":"","code":"# Load the Real Twig library library(rTwig) # File path to QSM file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") # Correct QSM cylinders qsm <- run_rtwig(file, twig_radius = 4.23) # Plot the result plot_qsm(qsm$cylinder) # View detailed tree metrics qsm$metrics"},{"path":"https://aidanmorales.github.io/rTwig/index.html","id":"quick-start-fractal-analysis","dir":"","previous_headings":"Installation","what":"Quick Start: Fractal Analysis","title":"Realistic Quantitative Structure Models","text":"rTwig also includes efficient function written C++ via Rcpp fractal analysis using voxel-counting method. example quickly calculate box-dimension point cloud using example data package. See vignette details explanation.","code":"# Load a point cloud file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file) # Calculate box-dimension output <- box_dimension(cloud) output[[2]]$slope"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":null,"dir":"Reference","previous_headings":"","what":"Box Dimension — box_dimension","title":"Box Dimension — box_dimension","text":"R port Dominik Seidel's fractal analysis \"box-dimension\" metric.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box Dimension — box_dimension","text":"","code":"box_dimension(cloud, lowercutoff = 0.01, rm_int_box = FALSE, plot = FALSE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box Dimension — box_dimension","text":"cloud point cloud matrix size n x 3. Non-matrices automatically converted matrix. lowercutoff smallest box size determined point spacing cloud meters. Defaults 1 cm. rm_int_box Remove initial box TRUE FALSE. Defaults FALSE. plot Plot results. user can specify \"2D\", \"3D\", \"\" plots. FALSE disables plotting. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box Dimension — box_dimension","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box Dimension — box_dimension","text":"box_dimension1rTwig box_dimension2rTwig box_dimension3rTwig box_dimension4rTwig box_dimension5rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/box_dimension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box Dimension — box_dimension","text":"","code":"## Calculate Box Dimension file <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") cloud <- read.table(file, header = FALSE) output <- box_dimension(cloud, plot = \"ALL\") #> Panning plot on rgl device: 1 output #> [[1]] #> # A tidytable: 9 × 2 #> log.box.size log.voxels #> #> 1 0 1.10 #> 2 0.693 1.95 #> 3 1.39 3.09 #> 4 2.08 4.11 #> 5 2.77 5.18 #> 6 3.47 6.14 #> 7 4.16 7.16 #> 8 4.85 8.23 #> 9 5.55 9.27 #> #> [[2]] #> # A tidytable: 1 × 4 #> r.squared adj.r.squared intercept slope #> #> 1 1.00 1.00 1.02 1.48 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster Cloud — cluster_cloud","title":"Cluster Cloud — cluster_cloud","text":"Cluster point cloud simulate point cloud based QSM. using input point cloud, cylinder ids transferred cloud using nearest neighbors. simulating cloud, points built directly cylinders user controlled spacing. cylinder id can used easily join desired variables QSM cloud. nearest neighbor search uses C++ nanoflann library.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster Cloud — cluster_cloud","text":"","code":"cluster_cloud(cylinder, cloud = NULL, spacing = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster Cloud — cluster_cloud","text":"cylinder QSM cylinder data frame. cloud input point cloud QSM cluster. NULL (default), simulated cloud returned. spacing point spacing meters simulated cloud. Defaults 0.02 meters.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster Cloud — cluster_cloud","text":"point cloud data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cluster Cloud — cluster_cloud","text":"blanco2014nanoflannrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/cluster_cloud.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster Cloud — cluster_cloud","text":"","code":"## Load Data file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") file2 <- system.file(\"extdata/cloud.txt\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii cloud <- read.table(file2) ## Clustered Cloud clustered_cloud <- cluster_cloud(cylinder = qsm, cloud = cloud) #> Clustering Point Cloud # # Join QSM variables and export # filename <- tempfile(pattern = \"clustered_cloud\", fileext = \".txt\") # clustered_cloud %>% # left_join(qsm) %>% # fwrite(file = filename) ## Simulated Cloud simulated_cloud <- cluster_cloud(cylinder = qsm, spacing = 0.01) #> Simulating Point Cloud # Plot Simulated Cloud plot_qsm(cloud = simulated_cloud) #> Plotting Cloud #> Panning plot on rgl device: 1 # # Join QSM variables and export # filename2 <- tempfile(pattern = \"simulated_cloud\", fileext = \".txt\") # simulated_cloud %>% # left_join(qsm) %>% # fwrite(file = filename2)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":null,"dir":"Reference","previous_headings":"","what":"Correct Radii — correct_radii","title":"Correct Radii — correct_radii","text":"Corrects cylinder radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correct Radii — correct_radii","text":"","code":"correct_radii(cylinder, twig_radius, broken_branch = TRUE)"},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correct Radii — correct_radii","text":"cylinder QSM cylinder data frame twig_radius Twig radius millimeters broken_branch Enable disable broken branch filter. Defaults enabled (TRUE).","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correct Radii — correct_radii","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/correct_radii.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Correct Radii — correct_radii","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics cylinder <- correct_radii(cylinder, twig_radius = 4.23) #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 30 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Export MAT — export_mat","title":"Export MAT — export_mat","text":"Exports cylinder data visualized TreeQSM's plot_cylinder_model() function","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export MAT — export_mat","text":"","code":"export_mat(cylinder, filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export MAT — export_mat","text":"cylinder QSM cylinder data frame filename Desired name file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export MAT — export_mat","text":"Returns .mat file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export MAT — export_mat","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_QSM\", fileext = \".mat\") export_mat(cylinder, filename) #> Exporting to .mat"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":null,"dir":"Reference","previous_headings":"","what":"Export Mesh — export_mesh","title":"Export Mesh — export_mesh","text":"Exports QSM cylinder mesh using rgl library","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export Mesh — export_mesh","text":"","code":"export_mesh( cylinder, filename, radius = NULL, color = NULL, palette = NULL, facets = 6, normals = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export Mesh — export_mesh","text":"cylinder QSM cylinder data frame filename File name path exporting. .ply extension automatically added present. radius Radius column name either quoted unquoted. Defaults modified cylinders cylinder data frame. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. normals Option export normals. Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export Mesh — export_mesh","text":"mesh .ply file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/export_mesh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export Mesh — export_mesh","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics filename <- tempfile(pattern = \"TreeQSM_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics filename <- tempfile(pattern = \"SimpleForest_mesh\") export_mesh(cylinder, filename) #> Exporting Mesh"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Import TreeQSM — import_qsm","title":"Import TreeQSM — import_qsm","text":"Imports QSM created TreeQSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import TreeQSM — import_qsm","text":"","code":"import_qsm(filename, version = \"2.x.x\")"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import TreeQSM — import_qsm","text":"filename TreeQSM .mat MATLAB file version TreeQSM version. Defaults 2.x.x. user can also specify 2.0 format.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import TreeQSM — import_qsm","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import TreeQSM — import_qsm","text":"TreeQSMrTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import TreeQSM — import_qsm","text":"","code":"## Read a TreeQSM MATLAB file in the 2.3.x - 2.4.x format file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.x.x\") #> Importing TreeQSM summary(qsm) #> Length Class Mode #> cylinder 17 data.frame list #> branch 10 data.frame list #> treedata 91 -none- list #> rundata 45 data.frame list #> pmdistance 21 -none- list #> triangulation 12 -none- list ## Read a TreeQSM MATLAB file in the 2.0 format file <- system.file(\"extdata/QSM_2.mat\", package = \"rTwig\") qsm <- import_qsm(file, version = \"2.0\") #> Importing TreeQSM names(qsm) #> [1] \"cylinder\" \"treedata\""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Treegraph — import_treegraph","title":"Import Treegraph — import_treegraph","text":"Imports QSM created treegraph","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Treegraph — import_treegraph","text":"","code":"import_treegraph(filename)"},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Treegraph — import_treegraph","text":"filename treegraph .json file","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Treegraph — import_treegraph","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import Treegraph — import_treegraph","text":"treegraph2rTwig treegraph1rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/import_treegraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import Treegraph — import_treegraph","text":"","code":"if (FALSE) { # \\dontrun{ # Import a treegraph QSM qsm <- import_treegraph(\"path/to/json/file\") } # }"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot QSM — plot_qsm","title":"Plot QSM — plot_qsm","text":"Efficiently plot QSMs point clouds. Uses Rcpp RGL libraries backends.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot QSM — plot_qsm","text":"","code":"plot_qsm( cylinder = NULL, radius = NULL, color = NULL, palette = NULL, alpha = 1, facets = 6, skeleton = FALSE, skeleton_lwd = NULL, cloud = NULL, pt_color = NULL, pt_size = NULL, triangulation = NULL, tri_color = NULL, tri_palette = NULL, axes = TRUE, axes_color = NULL, grid = FALSE, grid_color = NULL, hover = FALSE, bg_color = NULL, lit = TRUE, pan = TRUE, normalize = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot QSM — plot_qsm","text":"cylinder QSM cylinder data frame. radius Radius column name either quoted unquoted. Defaults modified radii. color Optional cylinder color parameter. Colors must single hex color string, grDevices::colors(), vector hex colors, quoted/unquoted column name. can also set \"random\" generate random solid color, FALSE disable color export. Vectors must length cylinder data frame. palette Optional color palette numerical data. Palettes include colourvalues::color_palettes() user supplied RGB palette matrix length cylinder. alpha Set transparency cylinders. Defaults 1. 1 opaque 0 fully transparent. facets number facets polygon cross section. Defaults 6, can increased improve visual smoothness cost performance memory. skeleton Plot QSM skeleton instead cylinders. Defaults FALSE. skeleton_lwd Skeleton line width. Defaults 1. cloud Point cloud data frame first three columns x, y, z coordinates coordinate system QSM. Defaults NULL. pt_color Color point cloud. Accepts hex colors, grDevices::colors(), \"random\". Defaults black. pt_size Size points. Defaults 0.1. triangulation Plot stem triangulation mesh TreeQSM. Defaults NULL. tri_color Color triangulation mesh. Colors must single hex color. tri_palette Optional triangulation color palette z values. Supports inputs palettes. axes Show plot axes. Defaults TRUE. axes_color Set axes color. Defaults black. grid Show plot grid lines. Defaults FALSE. grid_color Set grid lines color. Defaults grey. hover Show cylinder branch id mouse hover. Defaults FALSE. bg_color Set background color plot. Accepts hex colors grDevices::colors(). Defaults white. lit Enable light source plot. Defaults TRUE. Can set FALSE. pan Use right mouse button pan plot. Defaults TRUE, disabled hover enabled. normalize Normalize QSM 0,0,0 based provided data. Defaults FALSE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot QSM — plot_qsm","text":"rgl plot","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/plot_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot QSM — plot_qsm","text":"","code":"## TreeQSM Processing Chain & Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 triangulation <- qsm$triangulation plot_qsm(triangulation = triangulation) #> Plotting Triangulation #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Prune QSM — prune_qsm","title":"Prune QSM — prune_qsm","text":"Efficiently prune QSM. user can prune cylinder, branch, segment ids, height diameter classes, individually, time, return either pruned data, remaining data, binary index cylinders pruned.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prune QSM — prune_qsm","text":"","code":"prune_qsm( cylinder, cylinder_ids = NULL, branch_ids = NULL, segment_ids = NULL, height_m = NULL, diameter_cm = NULL, invert = FALSE, index = FALSE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prune QSM — prune_qsm","text":"cylinder QSM cylinder data frame cylinder_ids single vector cylinder ids. Everything connected cylinder pruned. branch_ids single vector branch ids. Everything connected branch pruned. segment_ids single vector segment ids. Everything connected segment pruned. height_m Height class meters cylinders pruned. Valid inputs numeric one decimal. diameter_cm Branch diameter class centimeters cylinders pruned. Valid inputs numeric one decimal. invert Return remaining pruned data. Defaults TRUE (remaining data), can set FALSE. index Returns column index called pruning indicating cylinder pruned (1) un-pruned (0). Defaults FALSE, can set TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prune QSM — prune_qsm","text":"data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/prune_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prune QSM — prune_qsm","text":"","code":"## Load QSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Pruning Index prune1 <- prune_qsm(cylinder, height_m = 2, index = TRUE) #> Pruning QSM plot_qsm(prune1, color = pruning, palette = \"blue2red\") #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Remaining prune2 <- prune_qsm(cylinder, height_m = 2, invert = FALSE) #> Pruning QSM plot_qsm(prune2) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## Pruned prune3 <- prune_qsm(cylinder, height_m = 2, invert = TRUE) #> Pruning QSM plot_qsm(prune3) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"QSM Summary — qsm_summary","title":"QSM Summary — qsm_summary","text":"Generates simple QSM summary (e.g. volume, surface area, dbh, etc.) totals branch order.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"QSM Summary — qsm_summary","text":"","code":"qsm_summary(cylinder, radius, triangulation = NULL)"},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"QSM Summary — qsm_summary","text":"cylinder QSM cylinder data frame radius Radius column name either quoted unquoted. triangulation QSM triangulation list. Defaults NULL. supports TreeQSM.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"QSM Summary — qsm_summary","text":"Returns list","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/qsm_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"QSM Summary — qsm_summary","text":"","code":"## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics qsm_summary(cylinder, radius) #> Creating QSM Summary #> [[1]] #> # A tidytable: 5 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 12.9 0.768 #> 2 1 8.70 1.07 #> 3 2 6.46 0.871 #> 4 3 1.82 0.298 #> 5 4 0.0723 0.0148 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.39 3.67 12.9 17.1 30.0 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #> # TreeQSM Triangulation file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics qsm_summary(cylinder, radius, triangulation = qsm$triangulation) #> Creating QSM Summary #> [[1]] #> # A tidytable: 6 × 3 #> branch_order tree_volume_L tree_area_m2 #> #> 1 0 28.7 0.632 #> 2 1 5.80 0.827 #> 3 2 3.86 0.732 #> 4 3 1.06 0.237 #> 5 4 0.622 0.0785 #> 6 5 0.0346 0.00693 #> #> [[2]] #> # A tidytable: 1 × 8 #> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L #> #> 1 7.18 3.69 28.7 11.4 40.1 #> # ℹ 3 more variables: stem_area_m2 , branch_area_m2 , #> # tree_area_m2 #>"},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rTwig: Realistic Quantitative Structure Models — rTwig-package","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Real Twig method correct branch overestimation quantitative structure models. Overestimated cylinders correctly tapered using measured twig diameters corresponding tree species. Supported quantitative structure modeling software includes 'TreeQSM', 'SimpleForest', 'Treegraph', 'aRchi'. Also included novel database twig diameters tools fractal analysis point clouds.","code":""},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/rTwig-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rTwig: Realistic Quantitative Structure Models — rTwig-package","text":"Maintainer: Aidan Morales moral169@msu.edu (ORCID) [copyright holder] Authors: David W. MacFarlane macfar24@msu.edu [copyright holder]","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Real Twig — run_rtwig","title":"Run Real Twig — run_rtwig","text":"Runs Real Twig steps","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Real Twig — run_rtwig","text":"","code":"run_rtwig( filename, twig_radius, metrics = TRUE, version = NULL, smooth = TRUE, standardize = FALSE, broken_branch = TRUE )"},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Real Twig — run_rtwig","text":"filename file path QSM (.mat, .csv, .json) twig_radius Twig radius millimeters metrics Calculate tree metrics? Defaults TRUE. version Defaults NULL. using specific version TreeQSM, user can specify version (e.g. 2.4.1, 2.0, etc.). smooth Defaults TRUE, using TreeQSM. Can set FALSE. standardize Standardize QSM cylinder data? Defaults FALSE. Can set TRUE. broken_branch Enable disable broken branch filter. Defaults TRUE.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Real Twig — run_rtwig","text":"Returns cylinder data frame list metrics true.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/run_rtwig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Real Twig — run_rtwig","text":"","code":"## TreeQSM file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- run_rtwig(file, twig_radius = 4.23) #> Importing TreeQSM #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics #> Smoothing QSM #> Generating Paths #> Filtering Paths #> Modeling Paths #> Updating Radii #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics str(qsm$cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 33 variables: #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.769 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.009949 -0.022059 0.016224 -0.000391 0.012068 ... #> $ axis.y : num 0.091165 0.019722 0.034392 -0.000295 0.023483 ... #> $ axis.z : num 0.996 1 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ modified : num 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth QSM — smooth_qsm","title":"Smooth QSM — smooth_qsm","text":"Visual smoothing QSM ensuring midpoints cylinders connected","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth QSM — smooth_qsm","text":"","code":"smooth_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth QSM — smooth_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth QSM — smooth_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/smooth_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth QSM — smooth_qsm","text":"","code":"file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics ## Before Smoothing plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1 ## After Smoothing cylinder <- smooth_qsm(cylinder) #> Smoothing QSM plot_qsm(cylinder) #> Plotting Cylinders #> Panning plot on rgl device: 1"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize QSM — standardize_qsm","title":"Standardize QSM — standardize_qsm","text":"Standardizes QSM variable names ordering across different QSM software","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize QSM — standardize_qsm","text":"","code":"standardize_qsm(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize QSM — standardize_qsm","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize QSM — standardize_qsm","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize QSM — standardize_qsm","text":"Renames supported QSM software output columns consistent. names lower case underscore delimited. See dictionary vignette detailed description column names. consistent QSM format ensures maximum compatibility analyzing QSMs made different software. function can run either update_cylinders function run, stage.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/standardize_qsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize QSM — standardize_qsm","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 28 variables: #> $ start_x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis_y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis_z : num 0.996 0.999 0.999 1 1 ... #> $ end_x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ raw_radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 32.8 32.7 32.6 32.6 32.6 ... #> $ base_distance : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ twig_distance : num 3.4 3.31 3.24 3.17 3.16 ... #> $ vessel_volume : num 279 271 266 260 259 ... #> $ pipe_area : int 82 82 82 82 82 82 82 82 82 82 ... #> $ pipe_radius : num 9.06 9.06 9.06 9.06 9.06 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 28 variables: #> $ start_x : num 0.761 0.759 0.771 0.768 0.765 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axis_y : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axis_z : num 0.996 0.963 0.998 0.999 0.998 ... #> $ end_x : num 0.759 0.771 0.768 0.765 0.769 ... #> $ end_y : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ raw_radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : int 18 18 18 18 18 18 18 18 18 18 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : num 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 31.4 31.4 31.3 31.3 31.2 ... #> $ base_distance : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ twig_distance : num 3.43 3.38 3.33 3.27 3.22 ... #> $ vessel_volume : num 237 233 229 226 222 ... #> $ pipe_area : int 69 69 69 69 69 69 69 69 69 69 ... #> $ pipe_radius : num 8.31 8.31 8.31 8.31 8.31 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- standardize_qsm(cylinder) #> Verifying Cylinders #> Please run `update_cylinders()` before using rTwig functions. #> Running `update_cylinders()' will suppress this message. str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 28 variables: #> $ start_x : num 0.763 0.77 0.77 0.763 0.764 ... #> $ start_y : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ start_z : num 254 254 254 254 254 ... #> $ axis_x : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axis_y : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axis_z : num 0.98 0.991 0.959 0.992 0.973 ... #> $ end_x : num 0.77 0.77 0.763 0.764 0.766 ... #> $ end_y : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ end_z : num 254 254 254 254 254 ... #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ raw_radius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_position: int 1 2 3 4 5 6 7 8 9 10 ... #> $ branch_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ reverse_order : num 20 20 20 20 20 20 20 20 20 20 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parent_segment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ total_children : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growth_length : num 34.2 34.2 34.2 34.1 34.1 ... #> $ base_distance : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ twig_distance : num 3.44 3.38 3.36 3.33 3.3 ... #> $ vessel_volume : num 416 409 406 403 400 ... #> $ pipe_area : int 121 121 121 121 121 121 121 121 121 121 ... #> $ pipe_radius : num 11 11 11 11 11 11 11 11 11 11 ... #> - attr(*, \".internal.selfref\")="},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Tree Metrics — tree_metrics","title":"Tree Metrics — tree_metrics","text":"Calculates tree metrics QSM","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tree Metrics — tree_metrics","text":"","code":"tree_metrics(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tree Metrics — tree_metrics","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tree Metrics — tree_metrics","text":"Returns list tree metric data frames synthetic point cloud","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tree Metrics — tree_metrics","text":"Calculates detailed tree, branch, segment metrics QSM. outputs include standard outputs TreeQSM, also additional variables, including, limited , growth length, reverse branch order, branch segment node relationships, distances twigs base tree, across various distribution metrics. Also included simulated point cloud tree, based QSM cylinder radii. corrected Real Twig, allow testing validation point cloud diameter overestimation throughout tree.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tree Metrics — tree_metrics","text":"TreeQSMrTwig growth_parameter1rTwig growth_parameter2rTwig treegraph2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/tree_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tree Metrics — tree_metrics","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") cylinder <- import_qsm(file)$cylinder #> Importing TreeQSM cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\" ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics metrics <- tree_metrics(cylinder) #> Calculating Branch Metrics #> Calculating Segment Metrics #> Calculating Tree Metrics #> Generating Point Cloud #> Calculating Crown Metrics #> Calculating Tree Distributions #> Calculating Branch Distributions #> Calculating Segment Distributions #> Calculating Stem Taper #> Calculating Spreads #> Calculating Alternate Branch Metrics names(metrics) #> [1] \"branch\" \"segment\" \"cloud\" #> [4] \"tree\" \"tree_height_dist\" \"tree_diameter_dist\" #> [7] \"tree_zenith_dist\" \"tree_azimuth_dist\" \"branch_diameter_dist\" #> [10] \"branch_height_dist\" \"branch_angle_dist\" \"branch_zenith_dist\" #> [13] \"branch_azimuth_dist\" \"branch_order_dist\" \"segment_diameter_dist\" #> [16] \"segment_height_dist\" \"segment_angle_dist\" \"segment_zenith_dist\" #> [19] \"segment_azimuth_dist\" \"segment_order_dist\" \"stem_taper\" #> [22] \"spreads\" \"vertical_profile\" \"branch_alt\""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":null,"dir":"Reference","previous_headings":"","what":"Twig Database — twigs","title":"Twig Database — twigs","text":"Database twig radii common North American tree species","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Twig Database — twigs","text":"","code":"twigs"},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/reference/twigs.html","id":"twigs","dir":"Reference","previous_headings":"","what":"twigs","title":"Twig Database — twigs","text":"data frame containing twig radii measurements scientific_name tree's genus species radius_mm average twig radius millimeters n twig measurement sample size min minimum twig radii samples max maximum twig radii samples std standard deviation twig radii cv coefficient variation twig radii","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Cylinders — update_cylinders","title":"Update Cylinders — update_cylinders","text":"Updates QSM cylinder data preparation radii correction","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Cylinders — update_cylinders","text":"","code":"update_cylinders(cylinder)"},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Cylinders — update_cylinders","text":"cylinder QSM cylinder data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Cylinders — update_cylinders","text":"Returns data frame","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update Cylinders — update_cylinders","text":"Updates verifies parent-child cylinder relationships calculates new variables metrics found throughout supported QSM software. function required run rest rTwig functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Update Cylinders — update_cylinders","text":"growth_parameter1rTwig growth_parameter2rTwig","code":""},{"path":"https://aidanmorales.github.io/rTwig/reference/update_cylinders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update Cylinders — update_cylinders","text":"","code":"## TreeQSM Processing Chain file <- system.file(\"extdata/QSM.mat\", package = \"rTwig\") qsm <- import_qsm(file) #> Importing TreeQSM cylinder <- qsm$cylinder cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1136 obs. of 32 variables: #> $ radius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ length : num 0.09392 0.07216 0.06654 0.00938 0.06795 ... #> $ start.x : num 0.768 0.768 0.768 0.769 0.769 ... #> $ start.y : num -16.4 -16.4 -16.4 -16.3 -16.3 ... #> $ start.z : num 254 254 254 254 254 ... #> $ axis.x : num 0.00995 -0.0111 0.01364 0.01571 0.01449 ... #> $ axis.y : num 0.0912 0.0391 0.0367 0.0271 0.0267 ... #> $ axis.z : num 0.996 0.999 0.999 1 1 ... #> $ end.x : num 0.769 0.768 0.769 0.769 0.77 ... #> $ end.y : num -16.4 -16.4 -16.3 -16.3 -16.3 ... #> $ end.z : num 254 254 254 254 254 ... #> $ added : num 0 0 0 0 0 0 0 0 0 0 ... #> $ BranchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ PositionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mad : num 0.00072 0.000538 0.000523 0.000335 0.000438 ... #> $ SurfCov : num 0.875 1 1 1 1 1 1 1 1 1 ... #> $ UnmodRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ OldRadius : num 0.0465 0.0454 0.0442 0.0437 0.0429 ... #> $ growthLength : num 32.8 32.7 32.6 32.6 32.6 ... #> $ branch : int 1 1 1 1 1 1 1 1 1 1 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ parent : num 0 1 2 3 4 5 6 7 8 9 ... #> $ extension : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0939 0.1661 0.2326 0.242 0.31 ... #> $ distanceToTwig : num 3.4 3.31 3.24 3.17 3.16 ... #> $ reversePipeAreaBranchorder : int 82 82 82 82 82 82 82 82 82 82 ... #> $ reversePipeRadiusBranchorder: num 9.06 9.06 9.06 9.06 9.06 ... #> $ vesselVolume : num 279 271 266 260 259 ... #> - attr(*, \".internal.selfref\")= ## SimpleForest Processing Chain file <- system.file(\"extdata/QSM.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1149 obs. of 29 variables: #> $ ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parentID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ startX : num 0.761 0.759 0.771 0.768 0.765 ... #> $ startY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.759 0.771 0.768 0.765 0.769 ... #> $ endY : num -16.4 -16.4 -16.3 -16.4 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num -0.0286 0.2148 -0.0473 -0.0498 0.0678 ... #> $ axisY : num -0.078889 0.163918 0.03933 -0.011114 -0.000265 ... #> $ axisZ : num 0.996 0.963 0.998 0.999 0.998 ... #> $ radius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ length : num 0.0497 0.0529 0.0535 0.0525 0.0528 ... #> $ growthLength : num 31.4 31.4 31.3 31.3 31.2 ... #> $ averagePointDistance : num 0.00589 0.00378 0.00205 0.00246 0.00251 ... #> $ segmentID : num 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegmentID : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchOrder : int 0 0 0 0 0 0 0 0 0 0 ... #> $ reverseBranchOrder : int 18 18 18 18 18 18 18 18 18 18 ... #> $ UnmodRadius : num 0.0472 0.0479 0.0469 0.0467 0.0453 ... #> $ branch_alt : num 0 0 0 0 0 0 0 0 0 0 ... #> $ branchID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ distanceFromBase : num 0.0497 0.1027 0.1562 0.2086 0.2614 ... #> $ distanceToTwig : num 3.43 3.38 3.33 3.27 3.22 ... #> $ reversePipeAreaBranchorder : int 69 69 69 69 69 69 69 69 69 69 ... #> $ reversePipeRadiusBranchorder: num 8.31 8.31 8.31 8.31 8.31 ... #> $ vesselVolume : num 237 233 229 226 222 ... #> - attr(*, \".internal.selfref\")= ## aRchi Processing Chain file <- system.file(\"extdata/QSM2.csv\", package = \"rTwig\") cylinder <- read.csv(file) cylinder <- update_cylinders(cylinder) #> Updating Cylinder Ordering #> Finding Branches #> Calculating Total Children #> Building Cylinder Network #> Caching Network #> Verifying Topology #> Calculating Growth Length #> Calculating Reverse Branch Order #> Calculating Branch Segments #> Calculating Alternate Branch Numbers #> Calculating Path Metrics str(cylinder) #> Classes ‘tidytable’, ‘tbl’, ‘data.table’ and 'data.frame':\t1231 obs. of 33 variables: #> $ startX : num 0.763 0.77 0.77 0.763 0.764 ... #> $ startY : num -16.4 -16.4 -16.4 -16.4 -16.3 ... #> $ startZ : num 254 254 254 254 254 ... #> $ endX : num 0.77 0.77 0.763 0.764 0.766 ... #> $ endY : num -16.4 -16.4 -16.4 -16.3 -16.4 ... #> $ endZ : num 254 254 254 254 254 ... #> $ axisX : num 0.1307 -0.0172 -0.2653 0.0294 0.1055 ... #> $ axisY : num 0.1531 -0.1311 0.0981 0.1203 -0.2048 ... #> $ axisZ : num 0.98 0.991 0.959 0.992 0.973 ... #> $ extension_ID : int 2 3 4 5 6 7 8 9 10 11 ... #> $ radius_cyl : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ length : num 0.0579 0.0269 0.0258 0.0245 0.0256 ... #> $ volume : num 0.000333 0.000155 0.000149 0.000141 0.000147 ... #> $ axis_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ segment_ID : int 44 44 44 44 44 44 44 44 44 44 ... #> $ node_ID : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branching_order : num 0 0 0 0 0 0 0 0 0 0 ... #> $ cyl_ID : int 1 2 3 4 5 6 7 8 9 10 ... #> $ parent_ID : num 0 1 2 3 4 5 6 7 8 9 ... #> $ UnmodRadius : num 0.0428 0.0428 0.0428 0.0428 0.0428 ... #> $ branch_ID : int 1 1 1 1 1 1 1 1 1 1 ... #> $ positionInBranch : int 1 2 3 4 5 6 7 8 9 10 ... #> $ totalChildren : int 1 1 1 1 1 1 1 1 1 1 ... #> $ growthLength : num 34.2 34.2 34.2 34.1 34.1 ... #> $ reverseBranchOrder : num 20 20 20 20 20 20 20 20 20 20 ... #> $ segment : int 1 1 1 1 1 1 1 1 1 1 ... #> $ parentSegment : int 0 0 0 0 0 0 0 0 0 0 ... #> $ branch_alt : int 0 0 0 0 0 0 0 0 0 0 ... #> $ distanceFromBase : num 0.0579 0.0847 0.1106 0.135 0.1606 ... #> $ distanceToTwig : num 3.44 3.38 3.36 3.33 3.3 ... #> $ reversePipeAreaBranchorder : int 121 121 121 121 121 121 121 121 121 121 ... #> $ reversePipeRadiusBranchorder: num 11 11 11 11 11 11 11 11 11 11 ... #> $ vesselVolume : num 416 409 406 403 400 ... #> - attr(*, \".internal.selfref\")="},{"path":[]},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.2.0","text":"cluster_cloud(): New function transfer QSM variables input point cloud simulate point cloud QSM. Efficient nearest neighbor searching done C++ nanoflann library: https://github.com/jlblancoc/nanoflann prune_qsm(): new function efficiently easily prune QSMs using multiple pruning criteria return options. aRchi QSMs now supported package. Users can now pass radius color column variables either unquoted quoted user facing functions like plot_qsm(), qsm_summary(), export_mesh(). Piping QSM cylinders functions allows user easily select unquoted columns. update_cylinders(): Three new allometric scaling variables standard outputs - vessel_volume, pipe_area, pipe_radius. plot_qsm(): Point clouds stem triangulation meshes can now plotted independently QSM. triangulation: user can now plot TreeQSM triangulation meshes passing triangulation list import_qsm(). user can also control color palette tri_color tri_palette. pan: right mouse button now pans plot instead zooming default. functionality mimics pan3d() RGL, rewritten Rcpp better responsiveness. lit: Enable disable plot lighting alpha: Set cylinder transparency. Note: can degrade performance large numbers cylinders facets. axes_color: axes color can now set user. skeleton_lwd: Set line width skeleton plots. normalize: Center cylinders around 0,0,0. Defaults FALSE. correct_radii(): broken branch filter can now disabled, broken_branch = FALSE Now returns modified, index cylinders modified Real Twig. run_rtwig(): broken branch filter can now disabled, broken_branch = FALSE","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-2-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.2.0","text":"~ 2 - 3x performance improvement! outlier broken branch filters rewritten Rcpp, massive performance gains. Parallel processing removed, eliminating overhead excessive memory usage. update_cylinders(): Fix bug path metrics SimpleForest QSMs (issue #4). Refactored tidyeval. Fix bug triangulation using correct ending cylinder. box_dimension(): 3D plot now pans right mouse button. run_rtwig(): Fix missing Treegraph parameter (issue #5). Fix bug start x,y,z values incorrect. Fix bug NA cylinder orientation values cause calculations fail. NA values removed user sees warning promoting check QSM. QSM network now cached temp folder avoid repeat calculations. Data checking helpful error messages now included every function. Add Real Twig Method paper citation package readme. New website look. Update vignettes. Update twig data base. Reduced package dependencies.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.2.0","text":"qsm_summary(): User can pass radius either quoted unquoted column name, longer default value. Failing provide radius throw error prompting user radius column name. correct_radii(): parallel processing removed, backend longer parameter. run_rtwig():parallel processing removed, backend longer parameter. file changed filename run_rtwig(), import_qsm(), import_treegraph() consistent functions.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-110","dir":"Changelog","previous_headings":"","what":"rTwig 1.1.0","title":"rTwig 1.1.0","text":"CRAN release: 2024-08-20","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"rTwig 1.1.0","text":"run_rtwig(): New function run Real Twig method calculate tree metrics one simple function. standardize_qsm(): New function standardize variable names across supported QSM software. See dictionary vignette details variable names. tree_metrics(): New function calculate standard outputs TreeQSM, plus new variables, metrics, simulated point clouds reconstructed entirely QSM. Computationally expensive tasks implemented Rcpp maximum performance. import_treegraph(): New function import Treegraph QSM. Treegraph support implemented throughout package! update_cylinders(): New variables: distanceFromBase, distanceToTwig, branch_alt. QSM topology now verified corrected topological errors. plot_qsm() Complete refactor Rcpp tidyeval massive performance improvements New QSM skeleton plotting option Supports plotting multiple QSMs plot Cylinder cloud colors can now set random bg_color can change background color plot export_mesh() Complete refactor Rcpp tidyeval massive performance improvements Cylinder color parameter can now set random, FALSE disable exporting colors Note: color exporting fixed future rgl package update","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"improvements-1-1-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"rTwig 1.1.0","text":"Implement Rcpp across package plot_qsm() > 10x performance improvement! smooth_qsm() > 10x performance improvement! export_mesh() > 10x performance improvement! box_dimension() ~ 3x performance improvement update_cylinder() ~2x performance improvement better vectorization Cleaned variable names removed repeat calculations Verify correct QSM topology Reduced package dependencies Cleanup function imports Update twig data base Update vignettes Update citations","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"breaking-changes-1-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"rTwig 1.1.0","text":"parent child cylinder IDs, nodes, branches begin numbering 1 ensure compatibility R indexing igraph. affects SimpleForest Treegraph. Redefined SimpleForest branch structure begin new branch order end twig. ensures consistency code calculations TreeQSM, Treegraph, SimpleForest. old branch definition saved new variable called branch_alt, changed begin zero consistent new branch_alt variable Real Twig. Renamed twigRad function parameter twig_radius consistent tidy style guidelines Renamed GrowthLength growthLength consistent SimpleForest Variable names qsm_summary() updated explicit consistent outputs tree_metrics() plot_qsm() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. export_mesh() now takes input column parameters quoted variables. cyl_color cyl_palette changed color palette respectively. cyl_sides renamed facets. plot_stand() deprecated functionality now incorporated plot_qsm() twigs: renamed scientific.name scientific_name radius.mm radius_mm consistent naming conventions across package.","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-102","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.2","title":"rTwig 1.0.2","text":"CRAN release: 2024-04-08 Reduced package size Allow user run examples Small text formatting changes Vignette webpage typo fixes Improved treedata import import_qsm()","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-101","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.1","title":"rTwig 1.0.1","text":"Initial CRAN Submission","code":""},{"path":"https://aidanmorales.github.io/rTwig/news/index.html","id":"rtwig-100","dir":"Changelog","previous_headings":"","what":"rTwig 1.0.0","title":"rTwig 1.0.0","text":"Initial release Real Twig!","code":""}]