reset dcm window before magick read
This commit is contained in:
parent
0c13abb9de
commit
0a3c36677b
@ -2,6 +2,7 @@
|
|||||||
- revised nohalo
|
- revised nohalo
|
||||||
- remove fading stuff from im_render() -- cleaner and simpler
|
- remove fading stuff from im_render() -- cleaner and simpler
|
||||||
- configure spots support for "restrict"
|
- configure spots support for "restrict"
|
||||||
|
- reset dcm:display-range on magick read to help DICOM
|
||||||
|
|
||||||
3/3/09 started 7.17.2
|
3/3/09 started 7.17.2
|
||||||
- im_magick2vips.c: allow funky bit depths, like 14 (thanks Mikkel)
|
- im_magick2vips.c: allow funky bit depths, like 14 (thanks Mikkel)
|
||||||
|
15
TODO
15
TODO
@ -1,3 +1,18 @@
|
|||||||
|
- need to set
|
||||||
|
|
||||||
|
-define dcm:display-range=reset
|
||||||
|
|
||||||
|
to stop window_width/_height screwing up our data in magick read
|
||||||
|
|
||||||
|
|
||||||
|
use
|
||||||
|
|
||||||
|
SetImageOption (image_info, "dcm:display-range", "reset");
|
||||||
|
|
||||||
|
somewhere
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- move im_shrink & friends to resample?
|
- move im_shrink & friends to resample?
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
* - use image->attributes if GetNextImageAttribute() is missing
|
* - use image->attributes if GetNextImageAttribute() is missing
|
||||||
* 3/3/09
|
* 3/3/09
|
||||||
* - allow funky bit depths, like 14 (thanks Mikkel)
|
* - allow funky bit depths, like 14 (thanks Mikkel)
|
||||||
|
* 17/3/09
|
||||||
|
* - reset dcm:display-range to help DICOM read
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -585,6 +587,15 @@ im_magick2vips( const char *filename, IMAGE *im )
|
|||||||
if( !(read = read_new( filename, im )) )
|
if( !(read = read_new( filename, im )) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
/* When reading DICOM images, we want to ignore any
|
||||||
|
* window_center/_width setting, since it may put pixels outside the
|
||||||
|
* 0-65535 range and lose data.
|
||||||
|
*
|
||||||
|
* These window settings are attached as vips metadata, so our caller
|
||||||
|
* can interpret them if it wants.
|
||||||
|
*/
|
||||||
|
SetImageOption( read->image_info, "dcm:display-range", "reset" );
|
||||||
|
|
||||||
read->image = ReadImage( read->image_info, &read->exception );
|
read->image = ReadImage( read->image_info, &read->exception );
|
||||||
if( !read->image ) {
|
if( !read->image ) {
|
||||||
im_error( "im_magick2vips", _( "unable to read file \"%s\"\n"
|
im_error( "im_magick2vips", _( "unable to read file \"%s\"\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user