Lines Matching refs:stream_info
2747 static int ReadDCMByte(DCMStreamInfo *stream_info,Image *image) in ReadDCMByte() argument
2751 if (stream_info->count == 0) in ReadDCMByte()
2759 if (stream_info->remaining <= 2) in ReadDCMByte()
2760 stream_info->remaining=0; in ReadDCMByte()
2762 stream_info->remaining-=2; in ReadDCMByte()
2773 stream_info->count=count; in ReadDCMByte()
2774 stream_info->byte=(-1); in ReadDCMByte()
2782 stream_info->count=256-count; in ReadDCMByte()
2783 stream_info->byte=byte; in ReadDCMByte()
2787 stream_info->count--; in ReadDCMByte()
2788 if (stream_info->byte >= 0) in ReadDCMByte()
2789 return(stream_info->byte); in ReadDCMByte()
2790 if (stream_info->remaining > 0) in ReadDCMByte()
2791 stream_info->remaining--; in ReadDCMByte()
2795 static unsigned short ReadDCMShort(DCMStreamInfo *stream_info,Image *image) in ReadDCMShort() argument
2807 value=(unsigned short) ReadDCMByte(stream_info,image); in ReadDCMShort()
2808 byte=ReadDCMByte(stream_info,image); in ReadDCMShort()
2815 static signed short ReadDCMSignedShort(DCMStreamInfo *stream_info,Image *image) in ReadDCMSignedShort() argument
2826 quantum.unsigned_value=ReadDCMShort(stream_info,image); in ReadDCMSignedShort()
2831 DCMStreamInfo *stream_info,MagickBooleanType first_segment, in ReadDCMPixels() argument
2875 ((int) info->max_value-ReadDCMByte(stream_info,image)) : in ReadDCMPixels()
2876 ReadDCMByte(stream_info,image); in ReadDCMPixels()
2881 pixel_value=ReadDCMSignedShort(stream_info,image); in ReadDCMPixels()
2883 pixel_value=(int) ReadDCMShort(stream_info,image); in ReadDCMPixels()
2892 byte=ReadDCMByte(stream_info,image); in ReadDCMPixels()
2898 pixel_value=ReadDCMSignedShort(stream_info,image); in ReadDCMPixels()
2950 pixel.red=(unsigned int) ReadDCMByte(stream_info,image); in ReadDCMPixels()
2951 pixel.green=(unsigned int) ReadDCMByte(stream_info,image); in ReadDCMPixels()
2952 pixel.blue=(unsigned int) ReadDCMByte(stream_info,image); in ReadDCMPixels()
2956 pixel.red=ReadDCMShort(stream_info,image); in ReadDCMPixels()
2957 pixel.green=ReadDCMShort(stream_info,image); in ReadDCMPixels()
2958 pixel.blue=ReadDCMShort(stream_info,image); in ReadDCMPixels()
3019 if (stream_info->offsets != (ssize_t *) NULL) \ in ReadDCMImage()
3020 stream_info->offsets=(ssize_t *) RelinquishMagickMemory( \ in ReadDCMImage()
3021 stream_info->offsets); \ in ReadDCMImage()
3022 if (stream_info != (DCMStreamInfo *) NULL) \ in ReadDCMImage()
3023 stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info); \ in ReadDCMImage()
3040 *stream_info; in ReadDCMImage() local
3117 stream_info=(DCMStreamInfo *) AcquireMagickMemory(sizeof(*stream_info)); in ReadDCMImage()
3120 if (stream_info == (DCMStreamInfo *) NULL) in ReadDCMImage()
3122 (void) memset(stream_info,0,sizeof(*stream_info)); in ReadDCMImage()
3854 for (i=0; i < (ssize_t) stream_info->remaining; i++) in ReadDCMImage()
3862 stream_info->offset_count=length >> 2; in ReadDCMImage()
3863 if (stream_info->offset_count != 0) in ReadDCMImage()
3865 if (stream_info->offsets != (ssize_t *) NULL) in ReadDCMImage()
3866 stream_info->offsets=(ssize_t *) RelinquishMagickMemory( in ReadDCMImage()
3867 stream_info->offsets); in ReadDCMImage()
3868 stream_info->offsets=(ssize_t *) AcquireQuantumMemory( in ReadDCMImage()
3869 stream_info->offset_count,sizeof(*stream_info->offsets)); in ReadDCMImage()
3870 if (stream_info->offsets == (ssize_t *) NULL) in ReadDCMImage()
3872 for (i=0; i < (ssize_t) stream_info->offset_count; i++) in ReadDCMImage()
3873 stream_info->offsets[i]=(ssize_t) ReadBlobLSBSignedLong(image); in ReadDCMImage()
3875 for (i=0; i < (ssize_t) stream_info->offset_count; i++) in ReadDCMImage()
3876 stream_info->offsets[i]+=offset; in ReadDCMImage()
3968 if (stream_info->offsets != (ssize_t *) NULL) in ReadDCMImage()
3969 stream_info->offsets=(ssize_t *) in ReadDCMImage()
3970 RelinquishMagickMemory(stream_info->offsets); in ReadDCMImage()
3971 stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info); in ReadDCMImage()
4018 for (i=0; i < (ssize_t) stream_info->remaining; i++) in ReadDCMImage()
4033 stream_info->offset_count=length >> 2; in ReadDCMImage()
4034 if (stream_info->offset_count != 0) in ReadDCMImage()
4036 if (stream_info->offsets != (ssize_t *) NULL) in ReadDCMImage()
4037 stream_info->offsets=(ssize_t *) in ReadDCMImage()
4038 RelinquishMagickMemory(stream_info->offsets); in ReadDCMImage()
4039 stream_info->offsets=(ssize_t *) AcquireQuantumMemory( in ReadDCMImage()
4040 stream_info->offset_count,sizeof(*stream_info->offsets)); in ReadDCMImage()
4041 if (stream_info->offsets == (ssize_t *) NULL) in ReadDCMImage()
4043 for (i=0; i < (ssize_t) stream_info->offset_count; i++) in ReadDCMImage()
4049 stream_info->offsets[i]=(ssize_t) offset; in ReadDCMImage()
4054 for (i=0; i < (ssize_t) stream_info->offset_count; i++) in ReadDCMImage()
4055 stream_info->offsets[i]+=offset; in ReadDCMImage()
4129 for (i=0; i < (ssize_t) stream_info->remaining; i++) in ReadDCMImage()
4140 stream_info->remaining=(size_t) ReadBlobLSBLong(image); in ReadDCMImage()
4141 if ((tag != 0xFFFEE000) || (stream_info->remaining <= 64) || in ReadDCMImage()
4144 if (stream_info->offsets != (ssize_t *) NULL) in ReadDCMImage()
4145 stream_info->offsets=(ssize_t *) in ReadDCMImage()
4146 RelinquishMagickMemory(stream_info->offsets); in ReadDCMImage()
4149 stream_info->count=0; in ReadDCMImage()
4150 stream_info->segment_count=ReadBlobLSBLong(image); in ReadDCMImage()
4152 stream_info->segments[i]=(ssize_t) ReadBlobLSBSignedLong(image); in ReadDCMImage()
4153 stream_info->remaining-=64; in ReadDCMImage()
4154 if (stream_info->segment_count > 1) in ReadDCMImage()
4158 if (stream_info->offset_count > 0) in ReadDCMImage()
4160 stream_info->offsets[0]+stream_info->segments[0],SEEK_SET); in ReadDCMImage()
4191 ReadDCMByte(stream_info,image)),q); in ReadDCMImage()
4197 ReadDCMByte(stream_info,image)),q); in ReadDCMImage()
4203 ReadDCMByte(stream_info,image)),q); in ReadDCMImage()
4209 ReadDCMByte(stream_info,image)),q); in ReadDCMImage()
4264 status=ReadDCMPixels(image,&info,stream_info,MagickTrue,exception); in ReadDCMImage()
4265 if ((status != MagickFalse) && (stream_info->segment_count > 1)) in ReadDCMImage()
4267 if (stream_info->offset_count > 0) in ReadDCMImage()
4269 stream_info->offsets[0]+stream_info->segments[1],SEEK_SET); in ReadDCMImage()
4270 (void) ReadDCMPixels(image,&info,stream_info,MagickFalse, in ReadDCMImage()
4327 if (stream_info->offsets != (ssize_t *) NULL) in ReadDCMImage()
4328 stream_info->offsets=(ssize_t *) in ReadDCMImage()
4329 RelinquishMagickMemory(stream_info->offsets); in ReadDCMImage()
4330 stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info); in ReadDCMImage()