Menu

#439 gdcm always shows blank screen

2.8.5
closed
None
3
2018-08-10
2017-11-15
No

in this dicom slide gdcm with vtk always shows me blank black screen but i can see this slide is working other dicom viewers.

1 Attachments

Discussion

  • Mathieu Malaterre

    Your image contains does not provide a Fonctional Group with the Pixel Spacing

    $ gdcminfo /media/sf_vagrant/image-000001.dcm
    Spacing: (0,0,1)
    

    I need to sanitize this code section, thanks for the bug report !

     
  • Mathieu Malaterre

    • assigned_to: Mathieu Malaterre
     
  • Mathieu Malaterre

    • status: open --> closed
    • Group: 2.8.4 --> 2.8.5
     
  • Mathieu Malaterre

    Fixed in 198d8727c006da7cd19fd899e62d0f42d7b6f1b8.

     
  • Mihail Isakov

    Mihail Isakov - 2018-08-10

    This change
    if (GetSpacingValueFromSequence(ds,t1, sp) ||
    GetSpacingValueFromSequence(ds,t2, sp))
    {
    assert( sp.size() == 3 );
    }
    else
    {
    sp.resize( 3 );
    + sp[0] = 1.;
    + sp[1] = 1.;
    sp[2] = 1.;
    gdcmWarningMacro( "Could not find Spacing" );
    }
    return sp;

    changed behavior for non-uniform enhanced images, if z spacing can not be read, x and y spacing become always 1, even if they were read before, because GetSpacingValueFromSequence returns false if it can not get z-spacing

    ftp://medical.nema.org/medical/dicom/DataSets/WG16/Philips/EnhancedMR/Brain/DICOM/IM_0016

    Such images are not seldom. My suggestion were to change GetSpacingValueFromSequence
    at the end to set z=1 there and return true

    current -------------------------------------
    double zspacing;
    bool b = ComputeZSpacingFromIPP(ds, zspacing);
    if( !b ) return false;

    sp.push_back( zspacing );

    return true;
    }

    suggestion ----------------------------------------

    double zspacing;
    if( ComputeZSpacingFromIPP(ds, zspacing) )
    {
    sp.push_back( zspacing );
    }
    else
    {
    sp.push_back( 1. );
    }

    return true;
    }

    This is not ideal, but IMHO better. Not ideal is an approach to read just fisrt per-frame entry if shared group fails. For example GE PET images exist with rescale intecept/slope different for every frame (...ohh).. But it is another story... I could make a pull req., but there is already one mine pull req. for gdcmImageHelper.cxx.
    Thank you
    Regards,
    Mihail

     

Log in to post a comment.