[Insight-users] MetaImage: absolute path in ElementDataFile not working

Florian Pierron F.Pierron at exeter.ac.uk
Mon May 12 08:41:10 EDT 2008


Dear ITK developer team,

I noticed that having an absolute path in the ElementDataFile is not 
supported in ITK 3.4.0. I don't know if there is a good reason for that 
or if it's just by mistake but it seems that there is an easy fix to 
that (if I am not wrong...). I have changed the following lines in 
\Utilities\MetaIO\metaImage.cxx:

- usePath = MET_GetFilePath(_headerName, pathName)

by

+  usePath = !MET_GetFilePath(elementDataFileName.c_str(), pathName) &&
+                 MET_GetFilePath(_headerName, pathName);

So that usePath (which determines in fact if the path to the header / 
meta file should be append to the elementDataFileName) is used only if 
the elementDataFileName is not an absolute path and if there is a path 
for the header / meta file.

Find attached the patch file.

Regards,
Florian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Patch_ITK-3-4_MetaImage
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080512/0c9ae846/attachment.txt>


More information about the Insight-users mailing list