[vtkusers] vtkGDCMImageReader for reading JPEG 2000 lossy compressed image data

Mathieu Malaterre mathieu.malaterre at gmail.com
Sun Sep 14 17:57:17 EDT 2008


Madhu,

[CC'ing everybody to close the loop.]

  Thanks for the image, a couple of things:
- '1.2.840.10008.5.1.4.1.1.12.77' is not a valid MediaStorage UID AFAIK,
- I fixed GDCM so that when an unknown media storage is found, but at
the same time a Pixel Data element is found to not give up too early

  So technically you should be able to read your image using GDCM 2.x
from trunk, however I must warn you that I said 'theoretically'.
Because your image is:

TransferSyntax is 1.2.840.10008.1.2.4.91 [JPEG 2000 Image Compression]
NumberOfDimensions: 3
Dimensions: (1024,200,200)
Origin: (0,0,0)
Spacing: (1,1,0)
DirectionCosines: (1,0,0,0,1,0)
Rescale Intercept/Slope: (0,1)
SamplesPerPixel    :1
BitsAllocated      :8
BitsStored         :8
HighBit            :7
PixelRepresentation:1
ScalarType found   :INT8
PhotometricInterpretation: MONOCHROME2
TransferSyntax: 1.2.840.10008.1.2.4.91
Orientation Label: AXIAL

  GDCM is pretty dumb for now, and requires that the whole image fits
in RAM to be loaded... Computation of the actual needed RAM is left as
an exercise.

  If you cannot find any other solutions, please contact me again, and
I'll help you write a small GDCM c++/python script to split your
multiframe images, into single slice image, which you'll then be able
to load a partial extent from.

HTH
-Mathieu

Ref:
 $ svn ci -m"ENH: add support for unknown media storage, where a pixel
data element can be found"
Sending        trunk/Applications/Cxx/gdcminfo.cxx
Sending        trunk/Source/DataStructureAndEncodingDefinition/gdcmMediaStorage.cxx
Sending        trunk/Source/DataStructureAndEncodingDefinition/gdcmMediaStorage.h
Sending        trunk/Source/MediaStorageAndFileFormat/gdcmImageReader.cxx
Transmitting file data ....
Committed revision 4320.



On Sun, Sep 14, 2008 at 4:37 PM, Madhusudhanan Balasubramanian
<madhu_lsu at yahoo.com> wrote:
>
>
> Hi Mathieu,
>
> Thanks.  That was a typographic error in my previous mail.  I used vtkGDCMImageReader class and I am using the very latest GDCM libraries (v. 2.0.8).  Still no luck.
>
> Madhu.
>
> --- On Sun, 9/14/08, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
>
>> From: Mathieu Malaterre <mathieu.malaterre at gmail.com>
>> Subject: Re: [vtkusers] vtkDICOMImageReader for reading JPEG 2000 lossy compressed image data
>> To: madhu_lsu at yahoo.com
>> Cc: vtkusers at vtk.org, gdcm-developers at lists.sourceforge.net
>> Date: Sunday, September 14, 2008, 9:04 AM
>> Use vtkGDCMImageReader (support J2K):
>>
>> http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html
>>
>> See link on how to install gdcm 2.x:
>>
>> http://gdcm.sourceforge.net/wiki/index.php/GDCM_Release_2.0
>>
>> 2cts
>>
>> On Sun, Sep 14, 2008 at 3:46 PM, Madhusudhanan
>> Balasubramanian
>> <madhu_lsu at yahoo.com> wrote:
>> > Hi,
>> >
>> > I am trying to read a DICOM file with
>> TransferSyntaxUID='1.2.840.10008.1.2.4.91' and
>> MediaStorageSOPClassUID =
>> '1.2.840.10008.5.1.4.1.1.12.77'.  The
>> vtkDICOMImageReader class seem not to support these
>> compressed data and storage formats.  Does anyone know how
>> to handle these data format using vtkDICOMImageReader or
>> another appropriate method or library that can handle these
>> data format?  I appreciate your help.
>> >
>> > Madhu.
>> >
>> >
>> >
>> > _______________________________________________
>> > This is the private VTK discussion list.
>> > Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>>
>>
>>
>> --
>> Mathieu
>
>
>
>



-- 
Mathieu



More information about the vtkusers mailing list