Closed anhnguyenvn closed 4 years ago
Hi Anh,
Congrats on running your PhysiCell model successfully :-)
I'm cc'ing Dylan, who may have some insight into using Unity to visualize PhysiCell output. I'm personally not very familiar with Unity, but it doesn't sound like it supports Python, which would be nice. But if you're up for the challenge and want to write a C# reader for Unity to read in the 3D output data, we could help you better understand the format. It's all open source after all. For example, see here where we write the files in C++: https://github.com/MathCancer/PhysiCell/blob/master/modules/PhysiCell_MultiCellDS.cpp#L451
Another options for viewing your 3D output from PhysiCell is ParaView: http://www.mathcancer.org/blog/paraview-for-physicell-part-1/
Randy
On Thu, Oct 17, 2019 at 11:48 PM Nguyen Hoang Anh notifications@github.com wrote:
I have compiled and ran successfully PhysiCell. From the output data, can anyone give me some directions to understand the data and make the 3D visualization using Unity Engine? I have searched for more info on the meaning of output data but so far I've got no result. So if possible can you direct me to the resource?
I do appreciate for that. Thank you all so much!
Regards, Anh
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=AANRKRPEGEFWIM3QRKHZLZDQPEWZVA5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSUH3VA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRKRM75JV25MJTCPWH4VLQPEWZVANCNFSM4JCCFTKQ .
Thanks, all!
Hello!
PhysiCell output data structures are documented in the user guide. Most relevant to you:
Each snapshot has: (1) an XML file with metadata, field names, etc. (2) a matlab MAT file with mesh information (typically same file for all snapshots to save space) (3) a matlab MAT file with chemical field output data (4) a matlab MAT file with basic cell agent information (focused on diffusion) (5) a matlab MAT file with (extended) PhysiCell agent information
See this post where we talk about the format in matlab: http://www.mathcancer.org/blog/working-with-physicell-snapshots-in-matlab/
Why matlab MAT files? Because it's simple, binary (so compact), well-documented (with an open and freely available specification), and read in just about all open source frameworks.
And if you need C++ code to read a matlab file, one is already included in
PhysiCell (with very minimal dependencies), and you're welcome to use it.
It reads data into a std::vector of std::vector
Each row has:
(ID,x,y,z,volume,cell_type,cycle_model_ID,current_cycle_phase,time_in_phase,
other fields) in the order listed in the XML filed
So, if you parse the XML file (e.g., using pugixml) and parse the appropriate MAT file, you should have access to what you need for plotting in any game engine (using their geometric primitives).
You might want to look at sample code in povwriter. http://github.com/PhysiCell-Tools/povwriter That code reads PhysiCell snapshots and writes a POV-ray scene for raytracing.
Lastly, if you write a code that reads PhysICell data into Unity to create a viewer, I think it would be a terrific code to consider adding to the PhysiCell-Tools collection. Let's talk!
Thanks -- Paul
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Paul Macklin, Ph.D. Associate Professor Director of Undergraduate Studies Intelligent Systems Engineerin g
Indiana University Founder and Lead of PhysiCell http://PhysiCell.organd MultiCellDS http://MultiCellDS.org mobile: 626-372-1203 email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: MathCancer.org Twitter: @MathCancer https://twitter.com/MathCancer
On Fri, Oct 18, 2019 at 10:48 AM Randy Heiland notifications@github.com wrote:
Hi Anh,
Congrats on running your PhysiCell model successfully :-)
I'm cc'ing Dylan, who may have some insight into using Unity to visualize PhysiCell output. I'm personally not very familiar with Unity, but it doesn't sound like it supports Python, which would be nice. But if you're up for the challenge and want to write a C# reader for Unity to read in the 3D output data, we could help you better understand the format. It's all open source after all. For example, see here where we write the files in C++:
https://github.com/MathCancer/PhysiCell/blob/master/modules/PhysiCell_MultiCellDS.cpp#L451
Another options for viewing your 3D output from PhysiCell is ParaView: http://www.mathcancer.org/blog/paraview-for-physicell-part-1/
Randy p.s. Dylan, you probably need to join this google group to have your replies be seen on the list.
On Thu, Oct 17, 2019 at 11:48 PM Nguyen Hoang Anh < notifications@github.com> wrote:
I have compiled and ran successfully PhysiCell. From the output data, can anyone give me some directions to understand the data and make the 3D visualization using Unity Engine? I have searched for more info on the meaning of output data but so far I've got no result. So if possible can you direct me to the resource?
I do appreciate for that. Thank you all so much!
Regards, Anh
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=AANRKRPEGEFWIM3QRKHZLZDQPEWZVA5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSUH3VA , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AANRKRM75JV25MJTCPWH4VLQPEWZVANCNFSM4JCCFTKQ
.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=ACVZW4EOZCCTQCXULTEUVXLQPHECTA5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUW7WA#issuecomment-543780824, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZW4CC5IAMEWXWXKEST33QPHECTANCNFSM4JCCFTKQ .
Thanks Paul and Randy for your guide, I'm working on it!
Great! Please do keep us posted!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Paul Macklin, Ph.D. Associate Professor Director of Undergraduate Studies Intelligent Systems Engineering
Indiana University Founder and Lead of PhysiCell http://PhysiCell.organd MultiCellDS http://MultiCellDS.org mobile: 626-372-1203 email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: MathCancer.org Twitter: @MathCancer https://twitter.com/MathCancer
On Sun, Oct 20, 2019 at 11:41 PM Nguyen Hoang Anh notifications@github.com wrote:
Thanks Paul and Randy for your guide, I'm working on it!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=ACVZW4DWPPEBZDPEPWYTIW3QPUQF7A5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBY6YAI#issuecomment-544336897, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZW4F3GEICMNYDA5XRFDDQPUQF7ANCNFSM4JCCFTKQ .
Hello,
I am working on biorobots sample, the output svg from physicell only has two colors red and blue while the video of yours https://www.youtube.com/watch?v=NdjvXI_x8uE has three kinds of cell presented by one another green color.
Can I ask for the reason about it? Thanks you so much!
Anh
If you are using the default configuration file, it should define "director" agents which are colored limegreen: https://github.com/MathCancer/PhysiCell/blob/master/sample_projects/biorobots/config/PhysiCell_settings.xml#L168
Randy
On Thu, Nov 7, 2019 at 12:03 AM Nguyen Hoang Anh notifications@github.com wrote:
Hello,
I am working on biorobots sample, the output svg from physicell only has two colors red and blue while the video of yours https://www.youtube.com/watch?v=NdjvXI_x8uE has three kinds of cell presented by one another green color.
Can I ask for the reason about it? Thanks you so much!
Anh
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=AANRKRLQBBZ7KUIK2ASCI6LQSOORPA5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDKABWY#issuecomment-550764763, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRKRI7VESV7EK2C6OQJC3QSOORPANCNFSM4JCCFTKQ .
Ahn, I apologize for replying too quickly. It seems you were correct in reporting this bug. If you want to test a fix, you can replace your biorobots.cpp with https://github.com/rheiland/pc4biorobots/blob/master/src/custom_modules/biorobots.cpp and recompile. We'll push out a fix in a subsequent minor release. -Randy
THanks, Randy!
On Mon, Nov 11, 2019 at 4:19 PM Randy Heiland notifications@github.com wrote:
Ahn, I apologize for replying too quickly. It seems you were correct in reporting this bug. If you want to test a fix, you can replace your biorobots.cpp with https://github.com/rheiland/pc4biorobots/blob/master/src/custom_modules/biorobots.cpp and recompile. We'll push out a fix in a subsequent minor release. -Randy
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/26?email_source=notifications&email_token=ACVZW4AQTZGV5M4RNURSDFLQTHD6ZA5CNFSM4JCCFTK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDYFGWI#issuecomment-552620889, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZW4AIJLDPGDGN4LWCZFLQTHD6ZANCNFSM4JCCFTKQ .
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Paul Macklin, Ph.D. Associate Professor Director of Undergraduate Studies Intelligent Systems Engineering
Indiana University Founder and Lead of PhysiCell http://PhysiCell.organd MultiCellDS http://MultiCellDS.org mobile: 626-372-1203 email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: MathCancer.org Twitter: @MathCancer https://twitter.com/MathCancer
Ahn, I apologize for replying too quickly. It seems you were correct in reporting this bug. If you want to test a fix, you can replace your biorobots.cpp with https://github.com/rheiland/pc4biorobots/blob/master/src/custom_modules/biorobots.cpp and recompile. We'll push out a fix in a subsequent minor release. -Randy
Thank Randy! It seems the local variables with same name took places of static ones.
Hi, I'm revisiting this issue. Is there any need to keep it open, or can I close the ticket?
OK, there has been no response, so I am closing this ticket. Please contact me if you need another.
Also, please note that the preferred support venue is SourceForge:
https://sourceforge.net/p/physicell/tickets/
Thank you!
I have compiled and ran successfully PhysiCell. From the output data, can anyone give me some directions to understand the data and make the 3D visualization using Unity Engine? I have searched for more info on the meaning of output data but so far I've got no result. So if possible can you direct me to the resource?
I do appreciate for that. Thank you all so much!
Regards, Anh