[vtkusers] Re: BioImageXD's vtk extensions

Dan White dan at chalkie.org.uk
Thu Jun 8 08:16:38 EDT 2006


Hi Gaetan,

if you get the  source code for bioimagexd public beta release 0.9 from

http://modeling.bio.jyu.fi/dl.php?file=source_targz

you will see in the C++ dir that there is our vtkLSMreader and some  
other of our custom classes

these can be asses to a fresh VTK sources CVS download tree
using the shell script below  (hopefully you can see how it works,  
and fix it if it doesnt work for you 1st time)

then when you build this version of VTK with our bits added, the LSM  
reader functionality will be there.
Cmake options to use:
shared libraries on
python wrapping on (use python2.4 make sure to use t to see the  
advanced options in ccmake and check 2.4 is being used not 2.3 for  
some bits)

configure and generate make files in cmake,
then make and make install

then bioimagexd sould work with
python2.4 BioImageXD.py
from in the bioiamgexd pytohn sources you downloaded.

and also our vtkLSMReader should be available to use from python  
scripts and c++ progs etc using VTK.

we will try to make full source build and install instructions for  
bioimagexd-VTK available when we do our next public beta release...

cheers

Dan



#! /bin/sh
if [ "$2" = "" ]; then
echo "Usage: install_classes.sh <BioImageXD directory> <VTK directory>"
exit
fi

INSTALL="IO Imaging Filtering Widgets"

CPPDIR=$1/C++
IMAGING=$2/Imaging
FILTERING=$2/Filtering
WIDGETS=$2/Widgets
IO=$2/IO

function insert_to_cmakelists {
   cxxfile=$1
   cmakefile=$2/CMakeLists.txt
   cat $cmakefile|sed s/"SET.*Kit_SRCS"/"SET( Kit_SRCS\n$cxxfile"/ >  
CMakeLists.new
   mv -f CMakeLists.new $cmakefile
}

if [ "`echo $INSTALL|grep Imaging`" ]
then
   for i in vtkImageColorMerge vtkImageAlphaFilter  
vtkImageColocalizationFilter vtkImageColocalizationTest \
   vtkImageMapToIntensities vtkImageSimpleMIP vtkImageSolitaryFilter
   do
     echo "Copying $i.cxx..."
     cp $CPPDIR/$i.cxx $IMAGING
     cp $CPPDIR/$i.h $IMAGING
     if [ "`grep $i $IMAGING/CMakeLists.txt`" = "" ]; then
        echo "Inserting $i.cxx to CMakeLists.txt"
        insert_to_cmakelists $i.cxx $IMAGING
     else
        echo "$i.cxx already in CMakeLists.txt"
     fi
   done
fi

if [ "`echo $INSTALL|grep Filtering`" ]
   then
   for i in vtkIntensityTransferFunction  
vtkImageAutoThresholdColocalization
   do
     echo "Copying $i.cxx..."
     cp $CPPDIR/$i.cxx $FILTERING
     cp $CPPDIR/$i.h $FILTERING
     if [ "`grep $i $FILTERING/CMakeLists.txt`" = "" ]; then
        echo "Inserting $i.cxx to CMakeLists.txt"
        insert_to_cmakelists $i.cxx $FILTERING
     else
        echo "$i.cxx already in CMakeLists.txt"
     fi
   done
fi

if [ "`echo $INSTALL|grep Widgets`" ]
then
   for i in vtkDistanceRepresentationScaled2D
   do
     echo "Copying $i.cxx..."
     cp $CPPDIR/$i.cxx $WIDGETS
     cp $CPPDIR/$i.h $WIDGETS
     if [ "`grep $i $WIDGETS/CMakeLists.txt`" = "" ]; then
        echo "Inserting $i.cxx to CMakeLists.txt"
        insert_to_cmakelists $i.cxx $WIDGETS
     else
        echo "$i.cxx already in CMakeLists.txt"
     fi
   done
fi

if [ "`echo $INSTALL|grep IO`" ]
then
   for i in vtkExtTIFFReader vtkLSMReader
   do
     echo "Copying $i.cxx..."
     cp $CPPDIR/$i.cxx $IO
     cp $CPPDIR/$i.h $IO
     if [ "`grep $i $IO/CMakeLists.txt`" = "" ]; then
        echo "Inserting $i.cxx to CMakeLists.txt"
        insert_to_cmakelists $i.cxx $IO
     else
        echo "$i.cxx already in CMakeLists.txt"
     fi
   done
fi




On 8 Jun 2006, at 14:58, Gaetan Lehmann wrote:

>
> Dan, Kalle,
>
> LSM reader is still not usable in ITK (with several channels), I  
> still lack a good GUI and it seems that it is possible to integrate  
> some itk filters in BioImageXD, so I'm looking again at BioImageXD.
> My problem is quite simple (for now): What is the procedure to  
> build vtk extensions you wrote, so they can be used in BioImageXD ?  
> I can't find any Makefile, any CMakeLists.txt or setup.py.  
> build_app.py only declares some functions, but nothing to call it.
>
> Can you tell me how you build that code ?
>
> Also, it seems that we are interested in the same domains -  
> confocal miscroscopy, image analysis, and python - so perhaps would  
> you find useful the development I (and others) have made for ITK.  
> Most of them are used for confocal microscopy image analysis, and  
> are fully usable with WrapITK.
> http://voxel.jouy.inra.fr/darcsweb/darcsweb.cgi
>
> Regards,
>
> Gaetan
>
>
> -- 
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr

Dr. Daniel James White BSc. (Hons.) PhD
Bioimaging Coordinator
Nanoscience Centre and Department of Biological and Environmental  
Sciences
Division of Molecular Recognition
Ambiotica C242
PO Box 35
University of Jyväskylä
Jyväskylä
FIN 40014
Finland

+358 14 260 4183 (work)
+358 468102840 (mobile)
http://www.bioimagexd.org
http://www.chalkie.org.uk
dan at chalkie.org.uk
white at cc.jyu.fi





More information about the vtkusers mailing list