]> granicus.if.org Git - imagemagick/blobdiff - coders/dcm.c
...
[imagemagick] / coders / dcm.c
index 1528b443e8d6af49b81d46e41f1b06d93af79aeb..94e8e6a8b1ce89f1dbc99aa29f9ba1f2ca468793 100644 (file)
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
 %  obtain a copy of the License at                                            %
 %                                                                             %
-%    http://www.imagemagick.org/script/license.php                            %
+%    https://www.imagemagick.org/script/license.php                           %
 %                                                                             %
 %  Unless required by applicable law or agreed to in writing, software        %
 %  distributed under the License is distributed on an "AS IS" BASIS,          %
@@ -2691,13 +2691,16 @@ typedef struct _DCMInfo
     max_value,
     samples_per_pixel,
     signed_data,
-    significant_bits,
-    window_width;
+    significant_bits;
 
-  ssize_t
+  MagickBooleanType
+    rescale;
+
+  double
     rescale_intercept,
     rescale_slope,
-    window_center;
+    window_center,
+    window_width;
 } DCMInfo;
 
 typedef struct _DCMStreamInfo
@@ -2854,7 +2857,7 @@ static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info,
                 if (info->signed_data)
                   pixel_value=ReadDCMSignedShort(stream_info,image);
                 else
-                  pixel_value=ReadDCMShort(stream_info,image);
+                  pixel_value=(int) ReadDCMShort(stream_info,image);
                 if (info->polarity != MagickFalse)
                   pixel_value=(int)info->max_value-pixel_value;
               }
@@ -2871,33 +2874,39 @@ static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info,
                   }
                 i++;
               }
-          index=(pixel_value*info->rescale_slope)+info->rescale_intercept;
-          if (info->window_width == 0)
+          if (info->signed_data == 1)
+            pixel_value-=32767;
+          index=pixel_value;
+          if (info->rescale != MagickFalse)
             {
-              if (info->signed_data == 1)
-                index-=32767;
-            }
-          else
-            {
-              ssize_t
-                window_max,
-                window_min;
+              double
+                scaled_value;
 
-              window_min=(ssize_t) ceil((double) info->window_center-
-                (info->window_width-1.0)/2.0-0.5);
-              window_max=(ssize_t) floor((double) info->window_center+
-                (info->window_width-1.0)/2.0+0.5);
-              if ((ssize_t)index <= window_min)
-                index=0;
-              else
-                if ((ssize_t)index > window_max)
-                  index=(int) info->max_value;
-                else
-                  index=(int) (info->max_value*(((index-info->window_center-
-                    0.5)/(info->window_width-1))+0.5));
+              scaled_value=pixel_value*info->rescale_slope+
+                info->rescale_intercept;
+              index=(int) scaled_value;
+              if (info->window_width != 0)
+                {
+                  double
+                    window_max,
+                    window_min;
+
+                  window_min=ceil(info->window_center-
+                    (info->window_width-1.0)/2.0-0.5);
+                  window_max=floor(info->window_center+
+                    (info->window_width-1.0)/2.0+0.5);
+                  if (scaled_value <= window_min)
+                    index=0;
+                  else
+                    if (scaled_value > window_max)
+                      index=(int) info->max_value;
+                    else
+                      index=(int) (info->max_value*(((scaled_value-
+                        info->window_center-0.5)/(info->window_width-1))+0.5));
+                }
             }
           index&=info->mask;
-          index=(int) ConstrainColormapIndex(image,(size_t) index,exception);
+          index=(int) ConstrainColormapIndex(image,(ssize_t) index,exception);
           if (first_segment)
             SetPixelIndex(image,(Quantum) index,q);
           else
@@ -2926,11 +2935,11 @@ static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info,
           pixel.blue&=info->mask;
           if (info->scale != (Quantum *) NULL)
             {
-              if (pixel.red <= GetQuantumRange(info->depth))
+              if ((MagickSizeType) pixel.red <= GetQuantumRange(info->depth))
                 pixel.red=info->scale[pixel.red];
-              if (pixel.green <= GetQuantumRange(info->depth))
+              if ((MagickSizeType) pixel.green <= GetQuantumRange(info->depth))
                 pixel.green=info->scale[pixel.green];
-              if (pixel.blue <= GetQuantumRange(info->depth))
+              if ((MagickSizeType) pixel.blue <= GetQuantumRange(info->depth))
                 pixel.blue=info->scale[pixel.blue];
             }
         }
@@ -2966,6 +2975,15 @@ static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info,
 
 static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
 {
+#define ThrowDCMException(exception,message) \
+{ \
+  if (data != (unsigned char *) NULL) \
+    data=(unsigned char *) RelinquishMagickMemory(data); \
+  if (stream_info != (DCMStreamInfo *) NULL) \
+    stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info); \
+  ThrowReaderException((exception),(message)); \
+}
+
   char
     explicit_vr[MagickPathExtent],
     implicit_vr[MagickPathExtent],
@@ -3045,38 +3063,40 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
   /*
     Read DCM preamble.
   */
+  data=(unsigned char *) NULL;
   stream_info=(DCMStreamInfo *) AcquireMagickMemory(sizeof(*stream_info));
   if (stream_info == (DCMStreamInfo *) NULL)
-    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+    ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(stream_info,0,sizeof(*stream_info));
   count=ReadBlob(image,128,(unsigned char *) magick);
   if (count != 128)
-    ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+    ThrowDCMException(CorruptImageError,"ImproperImageHeader");
   count=ReadBlob(image,4,(unsigned char *) magick);
   if ((count != 4) || (LocaleNCompare(magick,"DICM",4) != 0))
     {
       offset=SeekBlob(image,0L,SEEK_SET);
       if (offset < 0)
-        ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+        ThrowDCMException(CorruptImageError,"ImproperImageHeader");
     }
   /*
     Read DCM Medical image.
   */
   (void) CopyMagickString(photometric,"MONOCHROME1 ",MagickPathExtent);
+  info.polarity=MagickFalse;
+  info.scale=(Quantum *) NULL;
   info.bits_allocated=8;
   info.bytes_per_pixel=1;
   info.depth=8;
-  info.max_value=255UL;
   info.mask=0xffff;
-  info.polarity=MagickFalse;
-  info.rescale_intercept=0;
-  info.rescale_slope=1;
+  info.max_value=255UL;
   info.samples_per_pixel=1;
-  info.scale=(Quantum *) NULL;
   info.signed_data=(~0UL);
   info.significant_bits=0;
-  info.window_center=0;
-  info.window_width=0;
+  info.rescale=MagickFalse;
+  info.rescale_intercept=0.0;
+  info.rescale_slope=1.0;
+  info.window_center=0.0;
+  info.window_width=0.0;
   data=(unsigned char *) NULL;
   element=0;
   explicit_vr[2]='\0';
@@ -3116,7 +3136,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) CopyMagickString(implicit_vr,dicom_info[i].vr,MagickPathExtent);
     count=ReadBlob(image,2,(unsigned char *) explicit_vr);
     if (count != 2)
-      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+      ThrowDCMException(CorruptImageError,"ImproperImageHeader");
     /*
       Check for "explicitness", but meta-file headers always explicit.
     */
@@ -3132,7 +3152,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       {
         offset=SeekBlob(image,(MagickOffsetType) -2,SEEK_CUR);
         if (offset < 0)
-          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+          ThrowDCMException(CorruptImageError,"ImproperImageHeader");
         quantum=4;
       }
     else
@@ -3243,12 +3263,14 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         else
           if ((quantum != 0) && (length != 0))
             {
+              if (length > GetBlobSize(image))
+                ThrowDCMException(CorruptImageError,
+                  "InsufficientImageDataInFile");
               if (~length >= 1)
                 data=(unsigned char *) AcquireQuantumMemory(length+1,quantum*
                   sizeof(*data));
               if (data == (unsigned char *) NULL)
-                ThrowReaderException(ResourceLimitError,
-                  "MemoryAllocationFailed");
+                ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
               count=ReadBlob(image,(size_t) quantum*length,data);
               if (count != (ssize_t) (quantum*length))
                 {
@@ -3256,7 +3278,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                     (void) FormatLocaleFile(stdout,"count=%d quantum=%d "
                       "length=%d group=%d\n",(int) count,(int) quantum,(int)
                       length,(int) group);
-                   ThrowReaderException(CorruptImageError,
+                   ThrowDCMException(CorruptImageError,
                      "InsufficientImageDataInFile");
                 }
               data[length*quantum]='\0';
@@ -3267,7 +3289,6 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 sequence=MagickTrue;
                 continue;
               }
-
     if ((unsigned int) ((group << 16) | element) == 0xFFFEE0DD)
       {
         if (data != (unsigned char *) NULL)
@@ -3275,14 +3296,12 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         sequence=MagickFalse;
         continue;
       }
-
     if (sequence != MagickFalse)
       {
         if (data != (unsigned char *) NULL)
           data=(unsigned char *) RelinquishMagickMemory(data);
         continue;
       }
-
     switch (group)
     {
       case 0x0002:
@@ -3328,7 +3347,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                     count=(ssize_t) sscanf(transfer_syntax+17,".%d.%d",&type,
                       &subtype);
                     if (count < 1)
-                      ThrowReaderException(CorruptImageError,
+                      ThrowDCMException(CorruptImageError,
                         "ImproperImageHeader");
                   }
                 switch (type)
@@ -3440,7 +3459,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               info.bytes_per_pixel=2;
             info.depth=info.bits_allocated;
             if (info.depth > 32)
-              ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+              ThrowDCMException(CorruptImageError,"ImproperImageHeader");
             info.max_value=(1UL << info.bits_allocated)-1;
             image->depth=info.depth;
             break;
@@ -3456,7 +3475,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               info.bytes_per_pixel=2;
             info.depth=info.significant_bits;
             if (info.depth > 32)
-              ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+              ThrowDCMException(CorruptImageError,"ImproperImageHeader");
             info.max_value=(1UL << info.significant_bits)-1;
             info.mask=(size_t) GetQuantumRange(info.significant_bits);
             image->depth=info.depth;
@@ -3483,7 +3502,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               Visible pixel range: center.
             */
             if (data != (unsigned char *) NULL)
-              info.window_center=(ssize_t) StringToLong((char *) data);
+              info.window_center=StringToDouble((char *) data, (char **) NULL);
             break;
           }
           case 0x1051:
@@ -3492,7 +3511,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               Visible pixel range: width.
             */
             if (data != (unsigned char *) NULL)
-              info.window_width=StringToUnsignedLong((char *) data);
+              info.window_width=StringToDouble((char *) data, (char **) NULL);
             break;
           }
           case 0x1052:
@@ -3501,7 +3520,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               Rescale intercept
             */
             if (data != (unsigned char *) NULL)
-              info.rescale_intercept=(ssize_t) StringToLong((char *) data);
+              info.rescale_intercept=StringToDouble((char *) data,
+                (char **) NULL);
             break;
           }
           case 0x1053:
@@ -3510,7 +3530,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               Rescale slope
             */
             if (data != (unsigned char *) NULL)
-              info.rescale_slope=(ssize_t) StringToLong((char *) data);
+              info.rescale_slope=StringToDouble((char *) data, (char **) NULL);
             break;
           }
           case 0x1200:
@@ -3526,7 +3546,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             graymap=(int *) AcquireQuantumMemory((size_t) colors,
               sizeof(*graymap));
             if (graymap == (int *) NULL)
-              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+              ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
             for (i=0; i < (ssize_t) colors; i++)
               if (info.bytes_per_pixel == 1)
                 graymap[i]=(int) data[i];
@@ -3549,7 +3569,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             redmap=(int *) AcquireQuantumMemory((size_t) colors,
               sizeof(*redmap));
             if (redmap == (int *) NULL)
-              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+              ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
             p=data;
             for (i=0; i < (ssize_t) colors; i++)
             {
@@ -3577,7 +3597,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             greenmap=(int *) AcquireQuantumMemory((size_t) colors,
               sizeof(*greenmap));
             if (greenmap == (int *) NULL)
-              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+              ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
             p=data;
             for (i=0; i < (ssize_t) colors; i++)
             {
@@ -3605,7 +3625,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             bluemap=(int *) AcquireQuantumMemory((size_t) colors,
               sizeof(*bluemap));
             if (bluemap == (int *) NULL)
-              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+              ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
             p=data;
             for (i=0; i < (ssize_t) colors; i++)
             {
@@ -3661,7 +3681,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             if ((i == (ssize_t) length) || (length > 4))
               {
                 (void) SubstituteString(&attribute," ","");
-                (void) SetImageProperty(image,attribute,(char *) data,exception);
+                (void) SetImageProperty(image,attribute,(char *) data,
+                  exception);
               }
             attribute=DestroyString(attribute);
           }
@@ -3707,7 +3728,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       }
   }
   if ((width == 0) || (height == 0))
-    ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+    ThrowDCMException(CorruptImageError,"ImproperImageHeader");
   image->columns=(size_t) width;
   image->rows=(size_t) height;
   if (info.signed_data == 0xffff)
@@ -3724,30 +3745,20 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       int
         c;
 
-      size_t
-        length;
-
-      unsigned int
-        tag;
-
       /*
         Read offset table.
       */
       for (i=0; i < (ssize_t) stream_info->remaining; i++)
         (void) ReadBlobByte(image);
-      tag=(ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image);
-      (void) tag;
+      (void)((ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image));
       length=(size_t) ReadBlobLSBLong(image);
       stream_info->offset_count=length >> 2;
       if (stream_info->offset_count != 0)
         {
-          MagickOffsetType
-            offset;
-
           stream_info->offsets=(ssize_t *) AcquireQuantumMemory(
             stream_info->offset_count,sizeof(*stream_info->offsets));
           if (stream_info->offsets == (ssize_t *) NULL)
-            ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+            ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
           for (i=0; i < (ssize_t) stream_info->offset_count; i++)
             stream_info->offsets[i]=(ssize_t) ReadBlobLSBSignedLong(image);
           offset=TellBlob(image);
@@ -3785,7 +3796,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         if (tag == 0xFFFEE0DD)
           break; /* sequence delimiter tag */
         if (tag != 0xFFFEE000)
-          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+          ThrowDCMException(CorruptImageError,"ImproperImageHeader");
         file=(FILE *) NULL;
         unique_file=AcquireUniqueFileResource(filename);
         if (unique_file != -1)
@@ -3838,25 +3849,19 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       QuantumAny
         range;
 
-      size_t
-        length;
-
       /*
         Compute pixel scaling table.
       */
       length=(size_t) (GetQuantumRange(info.depth)+1);
       info.scale=(Quantum *) AcquireQuantumMemory(length,sizeof(*info.scale));
       if (info.scale == (Quantum *) NULL)
-        ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+        ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
       range=GetQuantumRange(info.depth);
       for (i=0; i <= (ssize_t) GetQuantumRange(info.depth); i++)
         info.scale[i]=ScaleAnyToQuantum((size_t) i,range);
     }
   if (image->compression == RLECompression)
     {
-      size_t
-        length;
-
       unsigned int
         tag;
 
@@ -3871,13 +3876,10 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       stream_info->offset_count=length >> 2;
       if (stream_info->offset_count != 0)
         {
-          MagickOffsetType
-            offset;
-
           stream_info->offsets=(ssize_t *) AcquireQuantumMemory(
             stream_info->offset_count,sizeof(*stream_info->offsets));
           if (stream_info->offsets == (ssize_t *) NULL)
-            ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+            ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
           for (i=0; i < (ssize_t) stream_info->offset_count; i++)
             stream_info->offsets[i]=(ssize_t) ReadBlobLSBSignedLong(image);
           offset=TellBlob(image)+8;
@@ -3908,8 +3910,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         one=1;
         if (colors == 0)
           colors=one << info.depth;
-        if (AcquireImageColormap(image,one << info.depth,exception) == MagickFalse)
-          ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+        if (AcquireImageColormap(image,colors,exception) == MagickFalse)
+          ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
         if (redmap != (int *) NULL)
           for (i=0; i < (ssize_t) colors; i++)
           {
@@ -3963,7 +3965,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         stream_info->remaining=(size_t) ReadBlobLSBLong(image);
         if ((tag != 0xFFFEE000) || (stream_info->remaining <= 64) ||
             (EOFBlob(image) != MagickFalse))
-          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+          ThrowDCMException(CorruptImageError,"ImproperImageHeader");
         stream_info->count=0;
         stream_info->segment_count=ReadBlobLSBLong(image);
         for (i=0; i < 15; i++)
@@ -3974,8 +3976,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             info.bytes_per_pixel=1;
             info.depth=8;
             if (stream_info->offset_count > 0)
-              SeekBlob(image,stream_info->offsets[0]+stream_info->segments[0],
-                SEEK_SET);
+              (void) SeekBlob(image,(MagickOffsetType) stream_info->offsets[0]+
+                stream_info->segments[0],SEEK_SET);
           }
       }
     if ((info.samples_per_pixel > 1) && (image->interlace == PlaneInterlace))
@@ -4052,21 +4054,40 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Convert DCM Medical image to pixel packets.
         */
-        if ((info.window_center != 0) && (info.window_width == 0))
-          info.window_width=(size_t) info.window_center;
         option=GetImageOption(image_info,"dcm:display-range");
         if (option != (const char *) NULL)
           {
             if (LocaleCompare(option,"reset") == 0)
               info.window_width=0;
           }
+        option=GetImageOption(image_info,"dcm:window");
+        if (option != (char *) NULL)
+          {
+            GeometryInfo
+              geometry_info;
+
+            MagickStatusType
+              flags;
+
+            flags=ParseGeometry(option,&geometry_info);
+            if (flags & RhoValue)
+              info.window_center=geometry_info.rho;
+            if (flags & SigmaValue)
+              info.window_width=geometry_info.sigma;
+            info.rescale=MagickTrue;
+          }
+        option=GetImageOption(image_info,"dcm:rescale");
+        if (option != (char *) NULL)
+          info.rescale=IsStringTrue(option);
+        if ((info.window_center != 0) && (info.window_width == 0))
+          info.window_width=info.window_center;
         status=ReadDCMPixels(image,&info,stream_info,MagickTrue,exception);
         if ((status != MagickFalse) && (stream_info->segment_count > 1))
           {
             if (stream_info->offset_count > 0)
-              SeekBlob(image,stream_info->offsets[0]+stream_info->segments[1],
-                SEEK_SET);
-            ReadDCMPixels(image,&info,stream_info,MagickFalse,exception);
+              (void) SeekBlob(image,(MagickOffsetType) stream_info->offsets[0]+
+                stream_info->segments[1],SEEK_SET);
+            (void) ReadDCMPixels(image,&info,stream_info,MagickFalse,exception);
           }
       }
     if (SetImageGray(image,exception) != MagickFalse)
@@ -4165,7 +4186,7 @@ ModuleExport size_t RegisterDCMImage(void)
   entry->decoder=(DecodeImageHandler *) ReadDCMImage;
   entry->magick=(IsImageFormatHandler *) IsDCM;
   entry->flags^=CoderAdjoinFlag;
-  entry->flags|=CoderSeekableStreamFlag;
+  entry->flags|=CoderDecoderSeekableStreamFlag;
   entry->note=ConstantString(DCMNote);
   (void) RegisterMagickInfo(entry);
   return(MagickImageCoderSignature);