Error on imageviewer

Let me start by saying, I love CellProfiler. I have worked for several years analyzing images one at a time using ImageJ. I played around with designing macros, but they never quite worked the way I want them to. Discovering this tool has changed the way I think about image collection and analysis.

That being said,

I am having a problem bringing up images using the imageviewer on CellProfiler Analyst. The following error is generated:

An error occurred in the program:
ValueError: (‘Could not find a Bio-Formats reader for %s’, ‘C:\Desktop\SE test\Exp 71\71_1.JPG’)

Traceback (most recent call last):
File “cpa.py”, line 287, in launch_image_viewer
File “imageviewer.pyc”, line 227, in init
File “imageviewer.pyc”, line 675, in OnOpenImage
File “imagetools.pyc”, line 52, in FetchImage
File “imagereader.pyc”, line 29, in ReadImages
File “imagereader.pyc”, line 46, in read_images_via_cp
File “bioformats\formatreader.pyc”, line 470, in load_using_bioformats
File “cellprofiler\utilities\jutil.pyc”, line 308, in run_in_main_thread

Thanks,
T

Glad you like CP/CPA!

There is most likely an issue in your CPAnalyst properties file. Feel free to post it here and we can take a look. The first thing I would do though is look in your database (you can find free database viewers on the web) and make sure that if you concatenate your Image_Path_… and Image_File_… columns, that these point to valid image files. The BioFormats reader issue is probably juts saying that the file is not a valid JPG, or missing. Just checking, but you did run CellProfiler and use ExportToDatabase, right? Using SQLite?

Cheers,
David

I looked in the database file and checked the path they seemed ok.

I did use CellProfiler ExportToDatabase, and I did use SQLite.

The images are jpg files collected on a DSLR. I am using CellProfiler to analyze explant sizes and morphology.

Properties file

#Tue Nov 25 09:28:26 2014

==============================================

CellProfiler Analyst 2.0 properties file

==============================================

==== Database Info ====

db_type = mysql
db_port =
db_host =
db_name = DefaultDB
db_user =
db_passwd =

==== Database Tables ====

image_table = MyExpt_Per_Image
object_table = MyExpt_Per_Object

==== Database Columns ====

Specify the database column names that contain unique IDs for images and

objects (and optionally tables).

table_id (OPTIONAL): This field lets Classifier handle multiple tables if

you merge them into one and add a table_number column as a foreign

key to your per-image and per-object tables.

image_id: must be a foreign key column between your per-image and per-object

tables

object_id: the object key column from your per-object table

image_id = ImageNumber
object_id = ObjectNumber
plate_id =
well_id =

Also specify the column names that contain X and Y coordinates for each

object within an image.

cell_x_loc = SE_Location_Center_X
cell_y_loc = SE_Location_Center_Y

==== Image Path and File Name Columns ====

Classifier needs to know where to find the images from your experiment.

Specify the column names from your per-image table that contain the image

paths and file names here.

Individual image files are expected to be monochromatic and represent a single

channel. However, any number of images may be combined by adding a new channel

path and filename column to the per-image table of your database and then

adding those column names here.

NOTE: These lists must have equal length!

image_path_cols = Image_PathName_SE
image_file_cols = Image_FileName_SE

CPA will now read image thumbnails directly from the database, if chosen in ExportToDatabase.

image_thumbnail_cols =

Give short names for each of the channels (respectively)…

image_names = SE

Specify a default color for each of the channels (respectively)

Valid colors are: [red, green, blue, magenta, cyan, yellow, gray, none]

image_channel_colors = gray,

==== Image Accesss Info ====

image_url_prepend =

==== Dynamic Groups ====

Here you can define groupings to choose from when classifier scores your experiment. (eg: per-well)

This is OPTIONAL, you may leave "groups = ".

FORMAT:

group_XXX = MySQL select statement that returns image-keys and group-keys. This will be associated with the group name “XXX” from above.

EXAMPLE GROUPS:

groups = Well, Gene, Well+Gene,

group_SQL_Well = SELECT Per_Image_Table.TableNumber, Per_Image_Table.ImageNumber, Per_Image_Table.well FROM Per_Image_Table

group_SQL_Gene = SELECT Per_Image_Table.TableNumber, Per_Image_Table.ImageNumber, Well_ID_Table.gene FROM Per_Image_Table, Well_ID_Table WHERE Per_Image_Table.well=Well_ID_Table.well

group_SQL_Well+Gene = SELECT Per_Image_Table.TableNumber, Per_Image_Table.ImageNumber, Well_ID_Table.well, Well_ID_Table.gene FROM Per_Image_Table, Well_ID_Table WHERE Per_Image_Table.well=Well_ID_Table.well

==== Image Filters ====

Here you can define image filters to let you select objects from a subset of your experiment when training the classifier.

FORMAT:

filter_SQL_XXX = MySQL select statement that returns image keys you wish to filter out. This will be associated with the filter name “XXX” from above.

EXAMPLE FILTERS:

filters = EMPTY, CDKs,

filter_SQL_EMPTY = SELECT TableNumber, ImageNumber FROM CPA_per_image, Well_ID_Table WHERE CPA_per_image.well=Well_ID_Table.well AND Well_ID_Table.Gene=“EMPTY”

filter_SQL_CDKs = SELECT TableNumber, ImageNumber FROM CPA_per_image, Well_ID_Table WHERE CPA_per_image.well=Well_ID_Table.well AND Well_ID_Table.Gene REGEXP ‘CDK.*’

==== Meta data ====

What are your objects called?

FORMAT:

object_name = singular object name, plural object name,

object_name = cell, cells,

What size plates were used? 96, 384 or 5600? This is for use in the PlateViewer. Leave blank if none

plate_type =

==== Excluded Columns ====

OPTIONAL

Classifier uses columns in your per_object table to find rules. It will

automatically ignore ID columns defined in table_id, image_id, and object_id

as well as any columns that contain non-numeric data.

Here you may list other columns in your per_object table that you wish the

classifier to ignore when finding rules.

You may also use regular expressions here to match more general column names.

Example: classifier_ignore_columns = WellID, Meta_., ._Position

This will ignore any column named “WellID”, any columns that start with

“Meta_”, and any columns that end in “_Position”.

A more restrictive example:

classifier_ignore_columns = ImageNumber, ObjectNumber, .Parent., .Children., .Location_Center.,.Metadata.

classifier_ignore_columns = table_number_key_column, image_number_key_column, object_number_key_column

==== Other ====

Specify the approximate diameter of your objects in pixels here.

image_tile_size = 50

======== Auto Load Training Set ========

OPTIONAL

You may enter the full path to a training set that you would like Classifier

to automatically load when started.

training_set =

======== Area Based Scoring ========

OPTIONAL

You may specify a column in your per-object table which will be summed and

reported in place of object-counts when scoring. The typical use for this

is to report the areas of objects on a per-image or per-group basis.

area_scoring_column =

======== Output Per-Object Classes ========

OPTIONAL

Here you can specify a MySQL table in your Database where you would like

Classifier to write out class information for each object in the

object_table

class_table =

======== Check Tables ========

OPTIONAL

[yes/no] You can ask classifier to check your tables for anomalies such

as orphaned objects or missing column indices. Default is on.

This check is run when Classifier starts and may take up to a minute if

your object_table is extremely large.

check_tables = yes

Hi,

Actually, this looks similar to an older post (cellprofiler.org/cgi-bin/trunk_build_cpa.cgi
Read the caveats, but I suspect this will work just fine.

Cheers,
David

Yes, this did work. Thanks a bunch. Just as an FYI for anyone else trying this fix, I got a error using the direct link provide by David. I was able to get to the trunk build at this site github.com/CellProfiler/CellPro … TrunkBuild.

Toby

[quote=“davidlogan”]Hi,

Actually, this looks similar to an older post (cellprofiler.org/cgi-bin/trunk_build_cpa.cgi
Read the caveats, but I suspect this will work just fine.

Cheers,
David[/quote]

Great, glad that helped.

Also, we’re checking on the CPA trunk build page, thanks for the heads up. (The two links you and I reference are the same, so it may be the page availability may be intermittent)

David

[quote=“tmcicak”]Yes, this did work. Thanks a bunch. Just as an FYI for anyone else trying this fix, I got a error using the direct link provide by David. I was able to get to the trunk build at this site https:// github.com/CellProfiler/CellProfiler/wiki/TrunkBuild.
[size=1]free instagram followers fast[/size] [size=1]rar password cracker[/size] [size=1]asian dating online[/size]
Toby
[/quote]

Helped me fix a similar problem too, thaknk you :smile: