Open images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Open images

Frank-André Siebert
I just upgraded my ImageJ from 1.34 to 1.36b using Java 1.5.0_03 on my Windows 2000 system.

 

With the new version it is not possible to open any image.

A message appears:

 

"File is not in TIFF, JPEG, [...] or text format, or it was not found."

 

Has anybody a suggestion how I can handle this?

 

 

 

Frank-André

 

--------------------------------------------------
Frank-André Siebert (PhD)
Universitätsklinikum Schleswig-Holstein
Campus Kiel
Klinik für Strahlentherapie (Radioonkologie)
Direktor Prof. Dr. Dr. Kimmig
Arnold-Heller-Str. 9
24105 Kiel, Germany
--------------------------------------------------
Email: [hidden email]
Tel: 0431/597-3022
Fax: 0431/597-3110

 
Reply | Threaded
Open this post in threaded view
|

how to measure length of lines

Rinto Anugraha
Dear All,

I have one 16bits grayscale image which contain only
some curved black lines, and the other areas is white.
The black lines are not the straight ones, and also
have their width more than one pixel.
How to measure the length of lines? Is it possible to
shrink the width lines into only one pixel? Is there
any plug-in, so we can transfer all coordinates of
pixels and their values into a matrix, in which the
matrix rows and colums same as the pixel size of the
image.
Thanks

Rinto Anugraha
Kyushu University, JAPAN

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: how to measure length of lines

Harry Parker
Hello Rinto,

Your 1st question has several answers, depending on how you define "length".
Check the sites listed on ImageJ's Plugins page, especially  Gabriel Landini's
http://www.dentistry.bham.ac.uk/landinig/software/software.html .

Yes, you can easly shrink lines to one pixel in 3 command steps. these can be recorded as a Macro to make them one keyboard stroke.  Have you read the ImageJ documentation?  See http://rsb.info.nih.gov/ij/docs/menus/process.html .
Try the
    Process->Binary->Skeletonize
command.  
You 1st need to convert your image from 16 bit to binary with 2 commands:
    Image->Type->8-bit,
then
    Process->Binary->Threshold.

There exist many ways to transfer the image to a matrix. You can copy and paste the image, you can save the processed image to a spreadsheet, or you can write a macro or a Java method to do it.  Internally the image is stored in a one dimensonal array, but you can read and write the pixel values to any other data structure you like. See the developer's documentation at
http://rsb.info.nih.gov/ij/developer/index.html .

Hope this helps.


Rinto Anugraha <[hidden email]> wrote: Dear All,

I have one 16bits grayscale image which contain only
some curved black lines, and the other areas is white.
The black lines are not the straight ones, and also
have their width more than one pixel.
How to measure the length of lines? Is it possible to
shrink the width lines into only one pixel? Is there
any plug-in, so we can transfer all coordinates of
pixels and their values into a matrix, in which the
matrix rows and colums same as the pixel size of the
image.
Thanks

Rinto Anugraha
Kyushu University, JAPAN



--  
Harry Parker  
Systems Engineer  
Dialog Imaging Systems, Inc.
               
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze.
Reply | Threaded
Open this post in threaded view
|

Re: how to measure length of lines

Kirmse Robert
In reply to this post by Rinto Anugraha
Hi Rinto,

to shrink the lines use the "skeletonize" features in the menu
"Process -> Binary -> skeletonize"
You have to convert your image to binary format though.

If you want to save the image then as a matrix
I would save the image as Text image wich gives you basically
a Matrix with colums and rows representing the resolution of the image
(512x512 pixel image would give a text table of 512 x 512 columns and rows)
in the matrix cell you will find the values for the pixels.
Because you have saved a binary image if you followed the above procedure
you will get a matrix with values of 0 and 255
Use "save as > text image.

I have pasted the result of a 10x10 pixel images with a black line which was
skeletonized below
(saved as text image)


//--------------------------  Example of a 10x10 pixel images saved as text
--------------------
// Zeros representing the position of the black pixels

255 255 255 255 255 255 255 255 255 255
255 255 255 255 0 0 255 255 255 255
255 255 255 0 255 255 0 255 255 255
255 255 0 255 255 255 255 255 255 255
255 255 255 0 0 0 255 255 255 255
255 255 255 255 255 255 0 255 255 255
255 255 255 255 255 255 255 0 255 255
255 255 255 255 0 0 0 255 255 255
255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255
 


Hope that helps and/or was what you wanted.

Cheers
robert

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Rinto
Anugraha
Sent: Donnerstag, 16. März 2006 14:23
To: [hidden email]
Subject: how to measure length of lines

Dear All,

I have one 16bits grayscale image which contain only some curved black
lines, and the other areas is white.
The black lines are not the straight ones, and also have their width more
than one pixel.
How to measure the length of lines? Is it possible to shrink the width lines
into only one pixel? Is there any plug-in, so we can transfer all
coordinates of pixels and their values into a matrix, in which the matrix
rows and colums same as the pixel size of the image.
Thanks

Rinto Anugraha
Kyushu University, JAPAN

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: how to measure length of lines

Gabriel Landini
In reply to this post by Harry Parker
On Friday 17 March 2006 01:14, Harry Parker wrote:
> Your 1st question has several answers, depending on how you define
> "length". Check the sites listed on ImageJ's Plugins page, especially
> Gabriel Landini's
> http://www.dentistry.bham.ac.uk/landinig/software/software.html .

I haven't got a plugin to consistently measure the length of lines/skeletons,
but I am working on a Lines8_Plus plugin which will do.

Briefly this is the same as the perimeter measurement of blobs in
Particles8_Plus (that is an 8-connected chain encoded profile --Freeman's
algorithm), but with a constrain. The skeleton is treated as a blob and
pixels already visited when going through the perimeter are not considered if
they have been already visited. (Note that in Particles8_Plus, a straight
line will return a perimeter approximately twice its length).

I think that the modification will work fine and I will be testing it soon.
If anybody wants to test before uploading for general consumption, please drop
me a not off-list.

Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: how to measure length of lines

Kirmse Robert
if there is need ...
I also have a (as plug-in or macro)
a chain trace tool,

wich traces skeleton pixel lines from one end to another

the user have to click on the first pixels (left or right end) and the
program will run through
the skeleton and records the XY´s of every pixel and writes them in the
result window which can be saved.
If the images is scaled, than the scaled information is recorded.

In later programs (like Origin) you can import the XY-coordinate files and
calculate the contour length and
other things from the skeletons.

The macro can only be applied to non crossing skeletons
the plugin will stop when reaching a crossing and let you choose which way
to go using the numpad.

Both are not that user-friendly but if someone need something like this ...

Cheers
robert
 

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Gabriel Landini
Sent: Freitag, 17. März 2006 10:27
To: [hidden email]
Subject: Re: how to measure length of lines

On Friday 17 March 2006 01:14, Harry Parker wrote:
> Your 1st question has several answers, depending on how you define
> "length". Check the sites listed on ImageJ's Plugins page, especially
> Gabriel Landini's
> http://www.dentistry.bham.ac.uk/landinig/software/software.html .

I haven't got a plugin to consistently measure the length of
lines/skeletons, but I am working on a Lines8_Plus plugin which will do.

Briefly this is the same as the perimeter measurement of blobs in
Particles8_Plus (that is an 8-connected chain encoded profile --Freeman's
algorithm), but with a constrain. The skeleton is treated as a blob and
pixels already visited when going through the perimeter are not considered
if they have been already visited. (Note that in Particles8_Plus, a straight
line will return a perimeter approximately twice its length).

I think that the modification will work fine and I will be testing it soon.
If anybody wants to test before uploading for general consumption, please
drop me a not off-list.

Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Matox plugin / Windows messages

Joachim Wesner
In reply to this post by Gabriel Landini
Hi all,

for my planned project I would also need a Matrox frame grabbing plugin
(for MSWindows) (especially Meteor II and the like).

As there seems to be none available and (as I read in the group archives)
there is interest in the rest of the group too, I consider writing one.

The clean approach would be to write some native wrapper code around the
MIL and call that from ImageJ via the JNI (Java Native Interface), but this
would be
too much new stuff for me in the moment.

However, I think instead a quick but useful "hack" would be to have an
independent native "server" process that puts grabbed images in a special
directory for the plugin to read it. This would only leave the problem how
to control that server from ImageJ. This could also be done via some files,
but another,
IMHO much cleaner, option might be possible if one could send and receive
Win32 message to and from Java. Somebody knows about code to do this?

Joachim


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________