[Insight-users] itk image writer
Luis Ibanez
luis.ibanez at kitware.com
Mon Jul 12 10:09:15 EDT 2004
Hi Zein,
ITK itself will not create directories for you.
When you specify directories for the ImageFileWriter or
the ImageFileReader, those directories must already exist.
There is however an auxiliary library distributed with ITK
that provides functionalities for creating directories,
deleting files and many other system-level tasks.
A Directory can be created with the
following command:
itksys::SystemTools::MakeDirectory( "myDirectory" );
For other functionalities please refer to
Insight/Utilities/kwsys/SystemTools.hxx
Note that because this utilities are system commands, you
must be *very careful* with their usage. You probably don't
want to delete you image database by accident :-)
Regards,
Luis
------------------
salah wrote:
> Hello all,
>
> an itk image writer must be fed with the full path name of the output file, right?
> However, it can NOT create directories if they do not exist. Is that also right?
>
> I want actually to save a volume image (3d itk image) into individual raw slices.
> (possible each slice in two .mhd + .raw files).
>
> Can the itk image writer do this directly??
>
> However, I wrote a function that does this. I always created the ourput directoy from
> outside the program. Can not the itk writer create it for me??
>
>
> many thanks,
> Zein
>
>
> _______________________________________________
> 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