Writing JPEG2000 file [message #45447] |
Wed, 07 September 2005 03:04  |
raval.chintan
Messages: 54 Registered: May 2005
|
Member |
|
|
Hello,
I want to generate the JPEG2000 file from the tiff file which is
containing 20000 samples and 20000 lines, I am writing the following
code.
jp2filename = 'abc'
Data = read_tiff('c:\satellite.tif')
imageDims = Size(data,/Dimension)
; Prepare JPEG2000 object property values.
ncomponents = 3
nLayers = 20
nLevels = 6
offset = [0,0]
jp2TileDims = [1024, 1024]
jp2TileOffset = [0,0]
bitdepth = [8,8,8]
; Create the JPEG2000 image object.
oJP2File = OBJ_NEW('IDLffJPEG2000',jp2filename , WRITE=1)
oJP2File->SetProperty, N_COMPONENTS=nComponents, $
N_LAYERS=nLayers, $
N_LEVELS=nLevels, $
OFFSET=offset, $
TILE_DIMENSIONS=JP2TileDims, $
TILE_OFFSET=JP2TileOffset, $
BIT_DEPTH=bitDepth, $
DIMENSIONS=[imageDims[1],ImageDims[2]]
oJP2FILE->SetData, Data
OBJ_DESTROY, oJP2FILE
Now the problem is that IDL 6.2 is unable to allocate the memory for
storing the data.
Is there any other way to do this? If yes Then How one can do it?
Thanks In Advance.
Chintan Raval.
|
|
|
Re: Writing JPEG2000 file [message #45479 is a reply to message #45447] |
Thu, 15 September 2005 11:37  |
David Alexander
Messages: 26 Registered: August 2005
|
Junior Member |
|
|
I'm not sure about this one. If REVERSIBLE is set to true I wouldn't
expect this to happen. Are you using IDL 6.1 or 6.2? I know that in 6.2
the version of Kakadu has been upgraded (Kakadu is the underlying
JPEG2000 library that IDL uses). If you're using 6.1, you might try
downloading an evaluation version of 6.2 to see if the same thing
happens.
|
|
|
Re: Writing JPEG2000 file [message #45493 is a reply to message #45447] |
Tue, 13 September 2005 23:48  |
raval.chintan
Messages: 54 Registered: May 2005
|
Member |
|
|
David,
I am facing one more problem with tiling mechanism, Here when I am
reading the JPEG2000 file normaly and try to display it with tiling
mechanism, the Data which is written on one tile and the data written
on the other tile are differing. So is so i think this problem i am
facing because i am making some mistake while writing the data. I am
setting property, n_Layers = Bits_per_sample of the file, and i am also
passing the / Reversible key word for the Lossless compression.
Again Thanks in Advance,
Chintan Raval
|
|
|