[Insight-users] problem with Morphogenesis
Luis Ibanez
luis.ibanez at kitware.com
Wed Jan 25 09:42:17 EST 2006
Hi Pavel,
The Species that was better debugged is the "Gradient Eating Bacteria",
altough the actual code was not quite finished, so it is not really
using the Gradient of the image yet. :-(
In practice, this bacteria is using only a intensity range. The lower
and upper values of that intensity range are written in the .dat file
(which is a very primitive mechanism for passing data... I have to
admit). The x,y coordinate of the pixel where the egg is placed are
also provided in that .dat file.
You should really give a try to the CelluarSegmentation tool, because
we wrote it after struggling the the Morphogenesis application. In the
CelluarSegmentation app, there is a single bacteria, and it is following
the same rules as the (so-called) "Gradient Eating Bacteria" in the
Morphogenesis example. However that user interaction is much better in
the CellularSegmentation app, because you can:
1) Place the egg in the image by simply clicking on the image
with the mouse,
2) You can also change the lower and upper values of the intensity
range for which the bacteria is allowed to replicate.
3) You can select the visualization to show the mesh connections,
or just the cells, or the bounding polygon. (this last option is
not that useful).
4) You can reset the colony, and go back to the one-egg state,
and restart the replication process.
The Cellular Segmentation paradigm is intended to provide a framework
where you could program the genome of different cells in order to
obtain particular behaviors. For example, the gradient eating bacteria
was intended to migrate through the image, by moving in the direction
of the image gradient. In this way, it was intended to behave as a
contour detection organism.
The long-term goal of the Morphogenesis example was to get to cells
with more complex genomes that will allow for differentiation and
therefore will be capable of creating realisting multi-cellular
organisms, instead of just bacterial colonies. Those organisms could
have more complex behaviors since they could have specialized cells
to be sensors, other to be locomotion elements and so on. The idea
was to get to customized organisms, that were programmed to perform
image processing tasks such as detection, pattern recognition, model
to image registration, and so on.
You probably will be intereseted in the "Deformable Organisms" work
performed by the team of Dr. Ghassan Hamarneh at Simon Fraser
University. This work was presented at MICCAI in 2001 and recently
published too in Medical Image Analysis journal.
http://www.cs.sfu.ca/~hamarneh/
The point of view of Biologist will be extremly helpful for further
developing the paradigm of Cell-based image processing. So we will
have more that happy to hear from you any suggestions that can
help improved this framework.
Engineering the genome of real bacteria (E. Coli) has been done
recently with the purpose of performing image processing.Mechanisms
such as edge detection are easily implemented by interaction of a
couple of genes, just in the same way the the cones in the retina
detect edges. (This was published in Nature recently):
"Synthetic biology: engineering Escherichia coli to see light."
http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=16306980&dopt=Citation
You are probably aware of the following works, but.. in any case
they are quite interesting reading if you are motivated to look
further on the notions of Computational power of Cellular Automata,
and the interrelationships between biology and computer science:
John Von Neumann, "Self-Replicating Automata"
http://en.wikipedia.org/wiki/John_von_Neumann
http://en.wikipedia.org/wiki/Self-replication
Alan Turing, "The Chemical Basis of Morphogenesis" 1952.
http://en.wikipedia.org/wiki/Alan_Turing
Stephen Wolfram, "A New Kind of Science"
http://www.wolframscience.com/thebook.html
Azriel Rosenfeld, "Picture Languages"
Regards,
Luis
-----------------------
Pavel Tomancak wrote:
> Hi Luis,
>
> Thanks for the quick response. Yes, it works now. I am still having
> troubles growing the colonies on top of an image, but I haven't played
> around with it the .dat files yet.
>
> I will look at the other applications that you mentioned. The
> morphogenesis approximation of cellular automata is particularly
> appealing to biologist, since it is so intuitive. I think this approach
> has great potential.
>
> I am quite sure I will be back to you or the mailing lists with more
> questions soon.
>
> All The Best
>
> PAvel
>
> ------------------------------------------------------------------------
> -----------
> Pavel Tomancak, Ph.D.
>
> Group Leader
> Max Planck Institute of Molecular Cell Biology and Genetics
> Pfotenhauerstr. 108
> D-01307 Dresden Tel.: +49 351 210 2670
> Germany Fax: +49 351 210 2020
> tomancak at mpi-cbg.de
> http://www.mpi-cbg.de
> ------------------------------------------------------------------------
> -----------
>
>
>
> On Jan 24, 2006, at 11:05 PM, Luis Ibanez wrote:
>
>>
>>
>> Hi Pavel
>>
>>
>> Thanks for pointing this out.
>>
>>
>> You just found a bug !
>>
>>
>> This bug seems to have been introduced recently when we replaced
>> the use of clock() functions with calls to the itk::RealTimeClock.
>>
>>
>> The bug is that we use a SmartPointer to a RealTimeClock but never
>> create it by invoking the New() operator.
>>
>> This has now been fixed in the CVS repository:
>>
>> http://www.itk.org/cgi-bin/viewcvs.cgi/Morphogenesis/
>> CellsViewerBase.cxx? root=InsightApplications&sortby=date&r2=1.28&r1=1.27
>>
>> In order to fix it in your local copy, you can update your CVS
>> checkout, or you could simply add the following line to the
>> constructor of the CellsViewerBase class in the file
>>
>>
>> InsightApplications/
>> Morphogenesis/
>> CellsViewerBase.cxx
>>
>>
>>
>> Note that this is not the traditional approach of Cellular Automata
>> that is implemented using the pixels of an image as the automata.
>> In this case we use the nodes of an itk::Mesh as the automata. In this
>> way we can easily insert and remove nodes (cells) from that mesh.
>>
>>
>> One direction that we were anticipating to explore was to actually
>> program the cells using a synthetic Gene Network, such as the one
>> proposed by Platzer at the German Cancer Research Center (DKFZ)
>>
>>
>> http://mbi.dkfz-heidelberg.de/projects/cellsim/
>>
>>
>> In that way, the State Machine controlling the behavior of the cell
>> will be defined by the interactions between the Genes and their
>> protein products.
>>
>> So far the State Machine of each one of the automata is pretty much
>> hard coded according to the species that you select.
>>
>>
>>
>> If you are interested in this area, you may want to try also the
>> CellularSegmentation example that is available in the directory:
>>
>>
>> InsightApplications/
>> CellularSegmentation/
>>
>>
>> This is a more recent example application than "Morphogenesis".
>>
>>
>>
>> Other applications of traditional Cellular Automata approaches can
>> be used in the Voting filters and the Hole Filling filters. You
>> will find descriptions of these filter in the ITK Software Guide
>>
>>
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>
>>
>>
>> Please let us know if you find any problems.
>>
>>
>>
>> Thanks
>>
>>
>>
>> Luis
>>
>>
>>
>>
>> --------------------
>> Pavel Tomancak wrote:
>>
>>> My experience with C++ is very limited, so some of this may sound a
>>> bit naive. I am a biologist after all.
>>> I downloaded InsightToolkit-2.4.0 and compiled it into /
>>> Applications/itk_binary on Mac OS X 10.3.9 with Xcode 1.5 and
>>> upgraded gcc to 3.3. I used the default cmake options, no Examples,
>>> no Tests.
>>> Everything seems fine after make, which I suspect means nothing.
>>> Hello World works.
>>> Now, I downloaded the InsightApplications-2.4.0, meddled slightly
>>> with CMakeLists.txt to skip to the Morphogenesis part. (I comment
>>> every SUBDIR before Morphogenesis, otherwise it takes too long to
>>> get there, couldn't figure any other way).
>>> I installed fltk-1.1.7 and pointed cmake to it, I also change the
>>> USE_FLTK to ON.
>>> Now I run make in the dir where I unpackaged the InsightApplication,
>>
>> 2> again everything seems fine, voila - a Morphogenesis application
>> appears.
>>
>>> It starts, windows appear, images can be loaded, zoomed and so on.
>>> I can create any species egg I want, but, now it comes, after
>>> clicking on play it invariantly crashes.
>>> Below please find the error messages which are truly
>>> incomprehensible to me. They are not always the same, but often
>>> there is a line like this
>>> 0 libITKCommon.dylib 0x013a1228
>>> itk::RealTimeClock::GetTimeStamp() const + 0x78
>>> I would appreciate any help, this whole application of cellular
>>> automata to image processing is totally fascinating. I am very eager
>>> to try it on my images.
>>> Thanks in advance
>>> PAvel
>>> Here comes the error message
>>> Date/Time: 2006-01-24 17:57:06 +0100
>>> OS Version: 10.3.9 (Build 7W98)
>>> Report Version: 2
>>> Command: Morphogenesis
>>> Path: /Users/tomancak/Desktop/InsightApplications-2.4.0/
>>> Morphogenesis/ Morphogenesis
>>> Version: ??? (???)
>>> PID: 10843
>>> Thread: 0
>>> Exception: EXC_BAD_ACCESS (0x0001)
>>> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000048
>>> Thread 0 Crashed:
>>> 0 libITKCommon.dylib 0x013a1228
>>> itk::RealTimeClock::GetTimeStamp() const + 0x78
>>> 1 Morphogenesis 0x00007eb8
>>> bio::CellsViewerBase::GetElapsedTime() const + 0x34
>>> 2 Morphogenesis 0x00009708
>>> bio::CellsViewerCommand::Execute(itk::Object const*,
>>> itk::EventObject const&) + 0xd4
>>> 3 Morphogenesis 0x00009828
>>> bio::CellsViewerCommand::Execute(itk::Object*, itk::EventObject
>>> const&) + 0x50
>>> 4 libITKCommon.dylib 0x01396f74
>>> itk::SubjectImplementation::InvokeEvent(itk::EventObject const&,
>>> itk::Object*) + 0xe8
>>> 5 libITKCommon.dylib 0x0139802c
>>> itk::Object::InvokeEvent(itk::EventObject const&) + 0x40
>>> 6 Morphogenesis 0x0000b47c
>>> bio::CellularAggregate::AdvanceTimeStep() + 0x1cc
>>> 7 Morphogenesis 0x0000782c
>>> bio::CellsViewerBase::Run() + 0xbc
>>> 8 Morphogenesis 0x00009204
>>> bio::CellsViewer::Run() + 0x20
>>> 9 Morphogenesis 0x00010a00
>>> CellsViewerGUI::cb_3_i(Fl_Button*, void*) + 0x40
>>> 10 Morphogenesis 0x00010a58
>>> CellsViewerGUI::cb_3(Fl_Button*, void*) + 0x44
>>> 11 Morphogenesis 0x0004061c Fl_Button::handle
>>> (int) + 0x3cc
>>> 12 Morphogenesis 0x00021998 send(int,
>>> Fl_Widget*, Fl_Window*) + 0xc0
>>> 13 Morphogenesis 0x00021cf4 Fl::handle(int,
>>> Fl_Window*) + 0x33c
>>> 14 Morphogenesis 0x00024268
>>> carbonMouseHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
>>> void*) + 0x2dc
>>> 15 <<00000000>> 0x92882e50 0 + 0x92882e50
>>> 16 <<00000000>> 0x928830c4 0 + 0x928830c4
>>> 17 <<00000000>> 0x92895530 0 + 0x92895530
>>> 18 Morphogenesis 0x0002342c
>>> carbonDispatchHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
>>> void*) + 0xf0
>>> 19 <<00000000>> 0x92882e50 0 + 0x92882e50
>>> 20 <<00000000>> 0x928830c4 0 + 0x928830c4
>>> 21 <<00000000>> 0x92895530 0 + 0x92895530
>>> 22 Morphogenesis 0x000238a4 do_queued_events
>>> (double) + 0x178
>>> 23 Morphogenesis 0x00023998 fl_wait(double) +
>>> 0x1c
>>> 24 Morphogenesis 0x00020f1c Fl::wait(double) +
>>> 0x84
>>> 25 Morphogenesis 0x00020f8c Fl::run() + 0x38
>>> 26 Morphogenesis 0x0000facc main + 0x34c
>>> 27 Morphogenesis 0x00003204 _start + 0x188
>>> (crt.c:267)
>>> 28 dyld 0x8fe1a278 _dyld_start + 0x64
>>> Thread 1:
>>> 0 libSystem.B.dylib 0x900078b8 mach_msg_trap + 0x8
>>> 1 libSystem.B.dylib 0x90007438 mach_msg + 0x38
>>> 2 com.unsanity.ape 0xc0002c14 __ape_internal +
>>> 0xce4
>>> 3 com.unsanity.ape 0xc0001a28 __ape_agent + 0x40
>>> 4 libSystem.B.dylib 0x90024990 _pthread_body + 0x28
>>> Thread 2:
>>> 0 libSystem.B.dylib 0x900078b8 mach_msg_trap + 0x8
>>> 1 libSystem.B.dylib 0x90007438 mach_msg + 0x38
>>> 2 ...lagutin.audio_hijack.server 0x01194e60 ah_serv_loop + 0x58
>>> 3 libSystem.B.dylib 0x90024990 _pthread_body + 0x28
>>> PPC Thread State:
>>> srr0: 0x013a1228 srr1: 0x0200f030 vrsave: 0x00000000
>>> cr: 0x82822222 xer: 0x20000004 lr: 0x013a11dc ctr: 0x90008b60
>>> r0: 0x800eeea0 r1: 0xbffff040 r2: 0x00000000 r3: 0x00000000
>>> r4: 0x00000000 r5: 0x00000000 r6: 0x0006b2df r7: 0x43d65c61
>>> r8: 0x000eeea0 r9: 0x015311c8 r10: 0x43300000 r11: 0x007b77ee
>>> r12: 0x000f4240 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
>>> r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
>>> r20: 0x00000002 r21: 0x00000000 r22: 0x0396b290 r23: 0x03929a00
>>> r24: 0xbffff7c0 r25: 0x00000030 r26: 0x0000002f r27: 0x00128a3c
>>> r28: 0x00128a40 r29: 0xbffff310 r30: 0xbffff040 r31: 0x013a11c8
>>> Binary Images Description:
>>> 0x1000 - 0x126fff Morphogenesis /Users/tomancak/Desktop/
>>> InsightApplications-2.4.0/Morphogenesis/ Morphogenesis
>>> 0x24c000 - 0x24dfff libITKznz.dylib /Applications/
>>> itk_binary/bin/libITKznz.dylib
>>> 0x267000 - 0x282fff libITKniftiio.dylib /Applications/
>>> itk_binary/bin/libITKniftiio.dylib
>>> 0x298000 - 0x2c8fff libITKNrrdIO.dylib /Applications/
>>> itk_binary/bin/libITKNrrdIO.dylib
>>> 0x2e8000 - 0x2fafff libitkzlib.dylib /Applications/
>>> itk_binary/bin/libitkzlib.dylib
>>> 0x405000 - 0x43bfff libitkjpeg12.dylib /Applications/
>>> itk_binary/bin/libitkjpeg12.dylib
>>> 0x444000 - 0x47afff libitkjpeg16.dylib /Applications/
>>> itk_binary/bin/libitkjpeg16.dylib
>>> 0x483000 - 0x4affff libitkpng.dylib /Applications/
>>> itk_binary/bin/libitkpng.dylib
>>> 0x4b7000 - 0x4e6fff libITKEXPAT.dylib /Applications/
>>> itk_binary/bin/libITKEXPAT.dylib
>>> 0x4ee000 - 0x559fff libITKAlgorithms.dylib /Applications/
>>> itk_binary/bin/libITKAlgorithms.dylib
>>> 0x5d7000 - 0x633fff libITKBasicFilters.dylib /
>>> Applications/itk_binary/bin/libITKBasicFilters.dylib
>>> 0x69e000 - 0x6fbfff libITKStatistics.dylib /Applications/
>>> itk_binary/bin/libITKStatistics.dylib
>>> 0x766000 - 0x79cfff libitkjpeg8.dylib /Applications/
>>> itk_binary/bin/libitkjpeg8.dylib
>>> 0x1008000 - 0x1068fff libitktiff.dylib /Applications/
>>> itk_binary/bin/libitktiff.dylib
>>> 0x1190000 - 0x1197fff alex_lagutin.audio_hijack.server 1.2.9
>>> /Library/Application Enhancers/Instant Hijack Server.ape/
>>> Contents/MacOS/Instant Hijack Server
>>> 0x11cd000 - 0x126efff libITKSpatialObject.dylib /
>>> Applications/itk_binary/bin/libITKSpatialObject.dylib
>>> 0x134c000 - 0x1365fff GLDriver /System/Library/Frameworks/
>>> OpenGL.framework/Versions/A/Resources/ GLDriver.bundle/GLDriver
>>> 0x1384000 - 0x1536fff libITKCommon.dylib /Applications/
>>> itk_binary/bin/libITKCommon.dylib
>>> 0x1700000 - 0x189afff libITKIO.dylib /Applications/
>>> itk_binary/bin/libITKIO.dylib
>>> 0x1a49000 - 0x1b4cfff libitkgdcm.dylib /Applications/
>>> itk_binary/bin/libitkgdcm.dylib
>>> 0x1c44000 - 0x1c96fff libitkvcl.dylib /Applications/
>>> itk_binary/bin/libitkvcl.dylib
>>> 0x1d73000 - 0x1d8dfff GLRendererFloat /System/Library/
>>> Frameworks/OpenGL.framework/Versions/A/Resources/
>>> GLRendererFloat.bundle/GLRendererFloat
>>> 0x1dc8000 - 0x1e89fff libITKNumerics.dylib /Applications/
>>> itk_binary/bin/libITKNumerics.dylib
>>> 0x1f4d000 - 0x2005fff libitkvnl_inst.dylib /Applications/
>>> itk_binary/bin/libitkvnl_inst.dylib
>>> 0x20ba000 - 0x2174fff libitkvnl_algo.dylib /Applications/
>>> itk_binary/bin/libitkvnl_algo.dylib
>>> 0x2229000 - 0x2298fff libitksys.dylib /Applications/
>>> itk_binary/bin/libitksys.dylib
>>> 0x23b5000 - 0x2520fff libitknetlib.dylib /Applications/
>>> itk_binary/bin/libitknetlib.dylib
>>> 0x2563000 - 0x25fdfff libITKDICOMParser.dylib /Applications/
>>> itk_binary/bin/libITKDICOMParser.dylib
>>> 0x26de000 - 0x27a5fff libITKMetaIO.dylib /Applications/
>>> itk_binary/bin/libITKMetaIO.dylib
>>> 0x28d4000 - 0x2c56fff libitkvnl.dylib /Applications/
>>> itk_binary/bin/libitkvnl.dylib
>>> 0x5dac000 - 0x5ea1fff GLEngine /System/Library/Frameworks/
>>> OpenGL.framework/Resources/GLEngine.bundle/ GLEngine
>>> 0x5f8a000 - 0x6060fff ATIRadeon9700GLDriver /System/Library/
>>> Extensions/ATIRadeon9700GLDriver.bundle/Contents/ MacOS/
>>> ATIRadeon9700GLDriver
>>> 0x61fd000 - 0x628cfff GLRasterARGB8888D32 /System/Library/
>>> Frameworks/OpenGL.framework/Resources/ GLRasterARGB8888D32.bundle/
>>> GLRasterARGB8888D32
>>> 0x80830000 - 0x8090efff libxml2.2.dylib /usr/lib/libxml2.2.dylib
>>> 0x8134c000 - 0x8134dfff libGLSystem.dylib /System/Library/
>>> Frameworks/OpenGL.framework/Versions/A/Libraries/ libGLSystem.dylib
>>> 0x83b6c000 - 0x83b78fff com.apple.agl 2.5 (AGL-2.5) /System/
>>> Library/Frameworks/AGL.framework/Versions/A/AGL
>>> 0x84cab000 - 0x84d9cfff libGLProgrammability.dylib /System/
>>> Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
>>> libGLProgrammability.dylib
>>> 0x8fe00000 - 0x8fe4ffff dyld /usr/lib/dyld
>>> 0x90000000 - 0x9014ffff libSystem.B.dylib /usr/lib/
>>> libSystem.B.dylib
>>> 0x901c0000 - 0x9026dfff com.apple.CoreFoundation 6.3.8 (299.36)
>>> /System/Library/Frameworks/CoreFoundation.framework/ Versions/
>>> A/CoreFoundation
>>> 0x902b0000 - 0x90529fff com.apple.CoreServices.CarbonCore 10.3.7
>>> /System/Library/Frameworks/CoreServices.framework/ Versions/A/
>>> Frameworks/CarbonCore.framework/Versions/A/CarbonCore
>>> 0x90584000 - 0x905f3fff com.apple.framework.IOKit 1.3.6 (???) /
>>> System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
>>> 0x90610000 - 0x9069afff com.apple.CoreServices.OSServices 3.0.1
>>> /System/Library/Frameworks/CoreServices.framework/ Versions/A/
>>> Frameworks/OSServices.framework/Versions/A/OSServices
>>> 0x90700000 - 0x90700fff com.apple.CoreServices 10.3 (???) /
>>> System/Library/Frameworks/CoreServices.framework/Versions/A/
>>> CoreServices
>>> 0x90702000 - 0x90769fff com.apple.audio.CoreAudio 2.1.3 /
>>> System/Library/Frameworks/CoreAudio.framework/Versions/A/ CoreAudio
>>> 0xc0000000 - 0xc000ffff com.unsanity.ape 1.4.6 /Library/
>>> Frameworks/ApplicationEnhancer.framework/Versions/A/
>>> ApplicationEnhancer
>>> ---------------------------------------------------------------------
>>> --- -----------
>>> Pavel Tomancak, Ph.D.
>>> Group Leader
>>> Max Planck Institute of Molecular Cell Biology and Genetics
>>> Pfotenhauerstr. 108
>>> D-01307 Dresden Tel.: +49 351 210 2670
>>> Germany Fax: +49 351 210 2020
>>> tomancak at mpi-cbg.de
>>> http://www.mpi-cbg.de
>>> ---------------------------------------------------------------------
>>> --- -----------
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
>
>
More information about the Insight-users
mailing list