Hi,
I am facing a similar problem to the original post. I have a sandwich RGB image created using a script that Mike has developed. Is there a way to create an ImageSequenceImpl from this and display as an RGB Composite?
I have tried the following code with the visible data and cooresponding IR data
print whatType(imgVIS)
FunctionType:
Domain has 1 components:
0. RealType: Time
0. Name = Time
0. Unit: s since 1970-01-01 00:00:00.000 UTC
Range:
FunctionType:
Domain has 2 components:
0. RealType: ImageElement
0. Name = ImageElement
1. RealType: ImageLine
1. Name = ImageLine
Range:
RealTupleType has 1 components:
0. RealType: Band1
0. Name = Band1
Code: Select all
from visad.meteorology import ImageSequenceImpl
rgbImg=[]
for dt in imgVIS.getImageTimes():
rgbImg.append(sandwich(colorTable[0], imgIR.getImage(counter), guessALB[counter], minIR, maxIR))
counter=counter+1
test=ImageSequenceImpl([rgbImg])
but this fails, because rgbImg is an array of flat fields not a single banded image.
I have also tried:
Code: Select all
timeString=[]
for dt in imgVIS.getImageTimes():
timeString.append(dt.toString())
timeField=makeTimeFieldFromFlatFields(rgbImg, timeString)
(where makeTimeFieldFromFlatFields is a function cited earlier in this post.)
and get the following error:
Number of Flat Fields: 3 Number of Times: 3 counter 0 2014-05-20 23:05:00Z
VisAD MathType analysis
FunctionType:
Domain has 2 components:
0. RealType: ImageElement
0. Name = ImageElement
1. RealType: ImageLine
1. Name = ImageLine
Range:
RealTupleType has 3 components:
0. RealType: redimage1
0. Name = redimage1
1. RealType: greenimage1
1. Name = greenimage1
2. RealType: blueimage1
2. Name = blueimage1
DataType
analysis... FlatField of length = 519200
((ImageElement, ImageLine) -> (redimage1, greenimage1, blueimage1))
Domain has 2 components:
Linear2DSet: Length = 519200
0. Linear1DSet (ImageElement) Range = 0.0 to 799.0 step 1.0
1. Linear1DSet (ImageLine) Range = 648.0 to 0.0 step -1.0
CoordinateSystem: (ImageElement, ImageLine) ==> (Latitude, Longitude)
Range has 3 components:
0. FloatSet (redimage1) Dimension = 1
0. number missing = 0
1. FloatSet (greenimage1) Dimension = 1
1. number missing = 0
2. FloatSet (blueimage1) Dimension = 1
2. number missing = 0
Number of Flat Fields: 3 Number of Times: 3 counter 1 2014-05-20 23:06:00Z
FunctionType:
Domain has 2 components:
0. RealType: ImageElement
0. Name = ImageElement
1. RealType: ImageLine
1. Name = ImageLine
Range:
RealTupleType has 3 components:
0. RealType: redimage2
0. Name = redimage2
1. RealType: greenimage2
1. Name = greenimage2
2. RealType: blueimage2
2. Name = blueimage2
DataType
analysis... FlatField of length = 519200
((ImageElement, ImageLine) -> (redimage2, greenimage2, blueimage2))
Domain has 2 components:
Linear2DSet: Length = 519200
0. Linear1DSet (ImageElement) Range = 0.0 to 799.0 step 1.0
1. Linear1DSet (ImageLine) Range = 648.0 to 0.0 step -1.0
CoordinateSystem: (ImageElement, ImageLine) ==> (Latitude, Longitude)
Range has 3 components:
0. FloatSet (redimage2) Dimension = 1
0. number missing = 0
1. FloatSet (greenimage2) Dimension = 1
1. number missing = 0
2. FloatSet (blueimage2) Dimension = 1
2. number missing = 0
Number of Flat Fields: 3 Number of Times: 3 counter 2 2014-05-20 23:07:00Z
FunctionType:
Domain has 2 components:
0. RealType: ImageElement
0. Name = ImageElement
1. RealType: ImageLine
1. Name = ImageLine
Range:
RealTupleType has 3 components:
0. RealType: redimage3
0. Name = redimage3
1. RealType: greenimage3
1. Name = greenimage3
2. RealType: blueimage3
2. Name = blueimage3
DataType
analysis... FlatField of length = 519200
((ImageElement, ImageLine) -> (redimage3, greenimage3, blueimage3))
Domain has 2 components:
Linear2DSet: Length = 519200
0. Linear1DSet (ImageElement) Range = 0.0 to 799.0 step 1.0
1. Linear1DSet (ImageLine) Range = 648.0 to 0.0 step -1.0
CoordinateSystem: (ImageElement, ImageLine) ==> (Latitude, Longitude)
Range has 3 components:
0. FloatSet (redimage3) Dimension = 1
0. number missing = 0
1. FloatSet (greenimage3) Dimension = 1
1. number missing = 0
2. FloatSet (blueimage3) Dimension = 1
2. number missing = 0
visad.TypeException: FieldImpl.setSample: bad range type
Is there a way to make an image sequence out of this?
Joleen