Does anyone here familiar with Geographical Information System (GIS) files format shapefiles (.shp) by ESRI software or .roi by ENVI remote sensing software. ENVI also support .roi as vector file format, but when i try to open the roi files ImageJ it says it does not supported. I need to get the segmented watershed (.roi) as polygon vector. I appreciate if anyone has knowledge in GIS and remote sensing background could assist me in this.
Do you mean to convert a ImageJ ROI to a shapefile?
I have written a special ROI exporter in Bio7 which uses R to convert ImageJ ROI’s to SpatialPolygons(Dataframe), SpatialPoints(DataFrame), etc.
With this functions you can extract easily image selection data (ROI’s from particle analysis data, classification data, thresholded areas, multiple selections) with ImageJ and transfer it to R.
The extracted polygons can be georeferenced again with the original image (see video tutorial).
Then the polygon can be saved to a *.shp file, etc., with the help of R, see:
See also (using the R packages sp, maptools and rgdal):
(lines can be replaced with polygons. Same action.)
This is exactly what i’m looking for! And im sooo glad it’s written with R which i am more familiar with. Thanks sooo much for your answer and sharing this. You just save my day and time!
You have to download and put the Bioformats library (bioformats_package.jar) in the embedded ImageJ plugins folder, location:
Bio7\plugins\com.eco.bio7.image_1.51.6\plugins\
Then you have to make an windowless import (The AWT GUI will not work. This is fixed in the current ImageJ plugin release and will be available in the next Bio7 release):
Plugins->Import->Bioformats (Windowless)
But I wonder which file format do you use that you are in need of the Bioformats library?
Sorry for the late reply. My raster file format is tiff file format. Even directly using ImageJ also requires bio-formats to import the image. Managed to import the roi to shapefiles format using your roi exporter in bio7. It works just fine.
Please note that the *.tiff (Geotiff) image data (without the georeference) can be opened directly with ImageJ without the bioformats library (e.g., just drag it on the ImageJ view panel).
Apropos if you need a visualization in 3D (a kind of nice plot with your data on a virtual globe) note that Bio7 also includes the gdal library (which also can be used from within Bio7 programmatically).
If you open your raster file in the WorldWind perspective it can be visualized georeferenced on the globe,
see:
Hi there
I am at the stage where I can create the polygons (and export them), and I am very familiar with ImageJ.
What I cant do though, is georeference the resulting polygons, even though I have both a world file from the existing geoTiff, and access to self-made GCP’s in mapinfo or google earth.
I am not that familiar with R, so is there an easy tutorial on how to georeference the resulting polygons, using known coordinates?