geotiff color error

16 views
Skip to first unread message

蔡慶輝 (Ken Tsai)

unread,
Jan 9, 2012, 3:26:24 AM1/9/12
to mirone
Dear Prof. Luis,
I have a new problem for using mirone.
The situation is when I want to open a geotiff file (sidescan sonar image) by mirone v2.2.0.
The mirone shows an error message as attachment.
Can you check what happen, please?
 
Best regards,
Ken
20120109161714.png

jluis

unread,
Jan 9, 2012, 7:28:59 AM1/9/12
to mirone
No, I can't. But you can. Set a break point at line 1477 of mirone.m
and see what causes the error. My guess is that the file doesn't have
a colormap as it should.
However, there is probably not much you can do either to avoid it, but
it doesn't seam a serious trouble. Just change the color map manually
with "Color palettes" tool.

Joaquim

Ching-Hui Tsai

unread,
Jan 9, 2012, 9:01:19 AM1/9/12
to mir...@googlegroups.com

Dear Prof.
But the image was shown well in v2.1.1. in both of source code or compiling version.

regards,
Ken

--
You received this message because you are subscribed to the Google Groups "mirone" group.
To post to this group, send email to mir...@googlegroups.com.
To unsubscribe from this group, send email to mirone+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mirone?hl=en.

jluis

unread,
Jan 9, 2012, 9:58:32 AM1/9/12
to mirone


On Jan 9, 2:01 pm, Ching-Hui Tsai <s0642...@gmail.com> wrote:
> Dear Prof.
> But the image was shown well in v2.1.1. in both of source code or compiling
> version.

Than I need to have access to the file to try to find out what changed
(please don't post it here). The reading of geotiff files is done by
GDAL (which was updated for Mirone 2.2.0), that is very stable across
versions.
Can you try to set the break point as I suggest in previous email and
find out what exactly causes the exception that leads to printing the
message you saw?

蔡慶輝 (Ken Tsai)

unread,
Jan 9, 2012, 9:49:27 PM1/9/12
to mir...@googlegroups.com
Dear Prof. Luis,
I send a message in attachment while I set a break point.

Best regards,
Ken

-----嚙踝蕭l嚙締嚙踝蕭-----
From: jluis
Sent: Monday, January 09, 2012 10:58 PM
To: mirone
Subject: [mirone:257] Re: geotiff color error

On Jan 9, 2:01 pm, Ching-Hui Tsai <s0642...@gmail.com> wrote:
> Dear Prof.
> But the image was shown well in v2.1.1. in both of source code or
> compiling
> version.

Than I need to have access to the file to try to find out what changed
(please don't post it here). The reading of geotiff files is done by
GDAL (which was updated for Mirone 2.2.0), that is very stable across
versions.
Can you try to set the break point as I suggest in previous email and
find out what exactly causes the exception that leads to printing the
message you saw?

> regards,
> Ken
> 2012-1-9 嚙磊嚙踝蕭8:29 嚙踝蕭 "jluis" <jl...@ualg.pt> 嚙篇嚙瘩嚙瘦

20120110104526.png

Joaquim Luis

unread,
Jan 10, 2012, 8:51:28 AM1/10/12
to mir...@googlegroups.com, "蔡慶輝 (Ken Tsai)"
On 10-01-2012 02:49, 嚙踝蕭嚙緙嚙踝蕭 (Ken Tsai) wrote:
> Dear Prof. Luis,
> I send a message in attachment while I set a break point.

Ken,

That screenshot doesn't help me because it doesn't provide any
information about the problem. It must be you on your machine that finds
what is causing the error. Hit F10 and see where it jumps to the 'catch'
line. When the program flux stops at the breakline like when you make
the screenshot, what does this command do?

size(att.Band(1).ColorMap.CMap)

Anyway, as I told you before, I cannot do much without having access to
the geotiff file.

PS. Please do not send big images attached as your screenshots. They are
are about 1.9 Mb. If you need to send example images just crop the image
around the relevant part and make sure they are small (no more than a
couple hundred kb)

jluis

unread,
Jan 10, 2012, 9:57:22 PM1/10/12
to mirone
Ken,

Issue is solved and it looks a hell like a Matlab bug to me. The
problem is that ML errors with the instruction

pal(handles.head(6)+2:end,1:end) = [];

but happily accepts

pal(handles.head(6)+2:end, :) = [];

but '1:end' or ':' should be exactly equivalent and in fact they are
if we put anything other than [] on the right end side. That is, this
works fine

pal(handles.head(6)+2:end,1:end) = 0;

I used the apparent silly 1:end because one guy in the TMW forum
clearly showed that for unknown reasons that type of construct is much
faster than the simple ':' ... when it doesn't BUG

Conclusion, replace line 1479 with

pal(handles.head(6)+2:end,:) = [];

I'll let you know when I have an updated version of mirone.exe
(standalone)

Joaquim

On Jan 10, 1:51 pm, Joaquim Luis <jl...@ualg.pt> wrote:
> On 10-01-2012 02:49, y (Ken Tsai) wrote:
>
> > Dear Prof. Luis,
> > I send a message in attachment while I set a break point.
>
> Ken,
>
> That screenshot doesn't help me because it doesn't provide any
> information about the problem. It must be you on your machine that finds
> what is causing the error. Hit F10 and see where it jumps to the 'catch'
> line. When the program flux stops at the breakline like when you make
> the screenshot, what does this command do?
>
> size(att.Band(1).ColorMap.CMap)
>
> Anyway, as I told you before, I cannot do much without having access to
> the geotiff file.
>
> PS. Please do not send big images attached as your screenshots. They are
> are about 1.9 Mb. If you need to send example images just crop the image
> around the relevant part and make sure they are small (no more than a
> couple hundred kb)
>
>
>
>
>
>
>
>
>
> > Best regards,
> > Ken
>
> > ----- l l ----- From: jluis
> > Sent: Monday, January 09, 2012 10:58 PM
> > To: mirone
> > Subject: [mirone:257] Re: geotiff color error
>
> > On Jan 9, 2:01 pm, Ching-Hui Tsai <s0642...@gmail.com> wrote:
> >> Dear Prof.
> >> But the image was shown well in v2.1.1. in both of source code or
> >> compiling
> >> version.
>
> > Than I need to have access to the file to try to find out what changed
> > (please don't post it here). The reading of geotiff files is done by
> > GDAL (which was updated for Mirone 2.2.0), that is very stable across
> > versions.
> > Can you try to set the break point as I suggest in previous email and
> > find out what exactly causes the exception that leads to printing the
> > message you saw?
>
> >> regards,
> >> Ken
> >> 2012-1-9 U 8:29 "jluis" <jl...@ualg.pt> g D G

蔡慶輝 (Ken Tsai)

unread,
Jan 10, 2012, 10:11:50 PM1/10/12
to mir...@googlegroups.com
Dear Prof.,
The Mirone works well now.
Thank you very much.

Best regards,
Ken

-----原始郵件-----
From: jluis
Sent: Wednesday, January 11, 2012 10:57 AM
To: mirone
Subject: [mirone:262] Re: geotiff color error

Reply all
Reply to author
Forward
0 new messages