[Insight-developers] Revert bool GDCMImageIO::m_LoadSequencesDefault
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon Apr 6 05:49:37 EDT 2009
On Fri, Apr 3, 2009 at 12:25 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> Hi there,
>
> Due to the recent issue(s) that have been raised on multiple mailing
> list, I would like to revert the line:
>
> bool GDCMImageIO::m_LoadSequencesDefault = false;
> bool GDCMImageIO::m_LoadPrivateTagsDefault = false;
>
> into
>
> bool GDCMImageIO::m_LoadSequencesDefault = true;
> bool GDCMImageIO::m_LoadPrivateTagsDefault = true;
>
> Only a couple of specific application may decide that GDCM 1.x parsing
> is too slow for their purpose, in which case they will be able to turn
> that flag back to false. Turning them to true will also make ITK more
> backward compatible as the default was to load everything anyway in
> the early itk::GDCMImageIO implementation.
>
> Comments ?
>
> --
> Mathieu
>
Going once, going twice, gone !
Index: itkGDCMImageIO.cxx
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/IO/itkGDCMImageIO.cxx,v
retrieving revision 1.156
diff -u -r1.156 itkGDCMImageIO.cxx
--- itkGDCMImageIO.cxx 31 Mar 2009 16:40:45 -0000 1.156
+++ itkGDCMImageIO.cxx 6 Apr 2009 09:47:59 -0000
@@ -72,8 +72,27 @@
};
// Initialize static members
-bool GDCMImageIO::m_LoadSequencesDefault = false;
-bool GDCMImageIO::m_LoadPrivateTagsDefault = false;
+/*
+ * m_LoadPrivateTagsDefault:
+ * When this flag is set to false, GDCM will try to use the value
stored in each private Group Length attribute value.
+ * This is a modest optimization feature that can be found in some
ACR-NEMA file and/or DICOM pre-2008 file.
+ * Because it is required by the standard that DICOM file reader can
read file where Group Length attribute value
+ * would be invalid, turning this flag to off, on the one hand might
lead to some speed improvement, but on the
+ * other hand will make your DICOM implementation non-standard.
+ * Technically Group Length value could be incorrect and GDCM might
even skipped over some public element and not
+ * just the desired current group of attributes. Do not turn this
option to false unless you understand the
+ * consequences.
+ *
+ * m_LoadSequencesDefault:
+ * Following the same idea (modest speed improvement), one can use a
feature from DICOM and use the Value Length
+ * of a Sequence attribute to 'seek' over a large number of nested attributes.
+ * Again this feature can lead to some modest speed improvement, but
seek'ing over public sequence is not
+ * a good idea. For instance you could be reading some new Enhanced
MR Image Storage, where the Pixel Spacing
+ * is stored within a Sequence attribute, therefore Pixel Spacing
would not be correct after a call to
+ * ExecuteInformation.
+ */
+bool GDCMImageIO::m_LoadSequencesDefault = true;
+bool GDCMImageIO::m_LoadPrivateTagsDefault = true;
#if GDCM_MAJOR_VERSION < 2
$ cvs ci -m"BUG: Document why previous defaults were so wrong."
itkGDCMImageIO.cxx
Running style check
Running style check
Processing itkGDCMImageIO.cxx
/cvsroot/Insight/Insight/Code/IO/itkGDCMImageIO.cxx,v <-- itkGDCMImageIO.cxx
new revision: 1.157; previous revision: 1.156
--
Mathieu
More information about the Insight-developers
mailing list