[Insight-users] Fw: [ITK + Python] Print method
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed Jun 15 14:39:38 EDT 2005
Hi Benoit,
I was asking this question to myself for a long time. And this evening, I
saw a itkStringStream class in itk.
display is done on several line of code, so I defined a Print function to
make it easier to use :
def Print(itkObject, f=sys.stderr) :
ss = StringStream()
itkObject.Print(ss.GetStream())
print >> f, ss.GetString()
1>import itk
2>itk.Print(itk.MedianImageFilter.F2F2.New())
MedianImageFilter (0x8beef88)
RTTI typeinfo: N3itk17MedianImageFilterINS_5ImageIfLj2EEES2_EE
Reference Count: 1
Modified Time: 10
Debug: Off
Observers:
none
Number Of Required Inputs: 1
Number Of Required Outputs: 1
Number Of Threads: 1
ReleaseDataFlag: Off
ReleaseDataBeforeUpdateFlag: Off
No Inputs
Output 0: (0x8c252e0)
AbortGenerateData: Off
Progress: 0
Multithreader:
RTTI typeinfo: N3itk13MultiThreaderE
Reference Count: 1
Modified Time: 2
Debug: Off
Observers:
none
Thread Count: 1
Global Maximum Number Of Threads: 0
Radius: [1, 1]
:-)
On Wed, 01 Jun 2005 12:19:23 +0200, Benoit Regrain
<benoit.regrain at creatis.insa-lyon.fr> wrote:
> Hi,
>
> I'm programming in Python
> I would call the Print method on an itkImage object from Python
> I don't understand what parameters I must specify.
>
> Could anyone send me an example.
> Cheers
>
> -----------------------------------------------------------------
> Benoit Regrain
> Ingénieur d'études CNRS (Creatis)
> email : regrain at creatis.insa-lyon.fr
> phone : (+33) (0) 4.72.43.82.58
> fax : (+33) (0) 4.72.43.85.26
> address :
> CREATIS - CNRS UMR5515
> INSA - Bâtiment Blaise Pascal
> 7, avenue Jean Capelle
> F - 69621 Villeurbanne Cedex
> -----------------------------------------------------------------
--
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list