[Insight-developers] Spaces in filenames for metaImage regular expression
Bill Lorensen
bill.lorensen at gmail.com
Wed Nov 21 14:57:01 EST 2012
Dirk,
If you do submit a patch, beware that you will not be able to merge it
since it is in the ThirdParty metaio tree. This is not a problem for
reviewers, just that someone from Kitware who has the permission to do
so will have to merge it. This is because meta io is used in several
packages other than ITK.
Looks like a good idea. You should probbaly add Stephen Aylward as a reviewer.
Bill
On Wed, Nov 21, 2012 at 2:10 PM, Padfield, Dirk R (GE Global Research)
<padfield at research.ge.com> wrote:
> Hi ITK Developers,
>
>
>
> I want to gather your thoughts before submitting a patch. I frequently read
> lists of 2D images into ITK as a volume, and I use metaImage .mhd files to
> specify the header information. Unfortunately, my code needs to handle
> images that have spaces in the names, and this doesn’t currently work with
> the regular expression functionality in metaImage. I end up having to use
> “LIST” instead, but this becomes cumbersome. So I modified the code of
> Modules\ThirdParty\MetaIO\src\MetaIO\metaUtils.cxx slightly to handle file
> names surrounded by double quotes. Before the “MET_StringToWordArray”
> parsed words based only on spaces, but now if it sees a double quote it
> ignores spaces until it sees the next double quote. Surrounding the
> filename with quotes is consistent with how executables handle file names
> with spaces.
>
>
>
> For example, to read the first 90 slices of a series, I can now do this:
>
> ElementDataFile = "B - 2(fld 1 z %02d).tif" 1 90 1
>
>
>
> My question is: does anyone see any problem with making such a change? I
> just wanted to gather some feedback before submitting the patch.
>
>
>
> Also, if anyone wants me to add them as a reviewer to the patch, please let
> me know.
>
>
>
> Thanks,
>
> Dirk
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
--
Unpaid intern in BillsBasement at noware dot com
More information about the Insight-developers
mailing list