[Insight-users] an error when running ShapeDetection

Luis Ibanez luis.ibanez@kitware.com
Sat, 07 Sep 2002 17:14:01 -0400


This is a multi-part message in MIME format.
--------------040406050909080901030604
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 7bit

Hi Zhao,

I tested the ShapeDetection example with
the image input file that you sent.

The image can be read without problem.

What is faililng in your test is the
process of writing the PGM files.

The ShapeDetection program ask you for
a directory where to put the pgm files.

You are answering "pgm" which requires
you to have previously created a
subdirectory "pgm".

If you have not created this subdirectory,
the program will not  be able to write on
it. (the program will not try to create
the directory).

Please try by creating a subdirectory
(e.g. "pgm", or any other name) and providing
this name to the Segmentation example.

You can also try by just giving "." (e.g. the
current directory) in which case the pgm
files will be writen in the current directory.

---

An easy way of testing this example is to recompile
it for "unsigned char" images. This is done by
replacing line 36 in ShapeDetectApp.h

The current line is:

   typedef signed short InputPixelType;

you can replace it by:

   typedef unsigned char InputPixelType;


With this pixel type you can use the BrainWeb
images available at the ftp server :

ftp://public.kitware.com/pub/itk/Data/BrainWeb

You can use the attached parameter file:
"parameters.txt" like:

    ShapeDetection < parameters.txt

It is using the brainweb image brainweb165a10f17.raw
and using a seed point at voxe l78 107 98 which
correspond to one of the ventricles.  A time =200.0
is enough to segment the ventricles in this case.

The whole process (including reading and writing
images) takes about 193 seconds in a Pentium 3
1 Ghz.


Please let us know if you encounter further problems,


Thanks


  Luis


==============================================

zhao wrote:

> Hi Luis,
> 
> 	This raw file is in the attachment.
> 
> 	In fact it is a 512 * 512 2-D raw file. I use it as a 128*128*8(2 Byte/pixel) file, just want to test the example.
> 
> 	Thanks!
> 
>  
> 
>>Hi Zhao,
>>
>>Could you please post the input file
>>that you used for running the example ?
>>
>>
>>The problem could be related to permissions
>>for writing in a directory. It could also be
>>that the input path doesn't actually correspond
>>to the locations where the input files are to be
>>found...
>>
>>Please let us know the content of the input file,
>>
>>Thanks
>>
>>
>>Luis
>>
>>=====================================
>>
>>zhao wrote:
>>
>>
>>>Hi all,
>>>	I encountered an error when running ShapeDetection:
>>>	
>>>	Input file name: e:\data\avf.raw
>>>	Input image big endian? [y|n]: n
>>>	Input image size: 128 128 8
>>>	PGM output directory: pgm
>>>	Writing PGM files of the input volume.
>>>	Caught an exception:
>>>	Execute()
>>>	Can't open file stream.
>>>
>>>	Could you give me some suggestion to sovle it ? thanks!
>>>
>>>Zhao ChenGuang
>>>P.O.Box:010,
>>>Dept. BME,
>>>Shanghai Jiao Tong University,
>>>1954# Hua Shan Road,
>>>Shanghai,P.R.China,
>>>200030
>>>
>>>


--------------040406050909080901030604
Content-Type: text/plain;
 name="parameters.txt"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="parameters.txt"

L2hvbWUvaWJhbmV6L2RhdGEvQnJhaW4vYnJhaW53ZWIxNjVhMTBmMTcucmF3Cm4KMTgxIDIx
NyAxODEKcGdtCjc4IDEwNyA5OAp0IDIwMC4wCngKCgoK
--------------040406050909080901030604--