Closed RFSH closed 3 years ago
@rastogi-bhavya and I had a call where I explained the new model and how he can modify the records. The recording can be found here. In the following I will just summarize the main points and URLs that we discussed during the meeting:
Look at the structure of Processed_Image: https://dev.rebuildingakidney.org/ermrest/catalog/2/schema/Gene_Expression/table/Processed_Image
The image with multiple Z_Index: https://dev.rebuildingakidney.org/ermrest/catalog/2/entity/Gene_Expression:Image/RID=16-2GJM
The channels of the image with multiple Z_Index: https://dev.rebuildingakidney.org/ermrest/catalog/2/entity/Gene_Expression:Image_Channel/Image=16-2GJM
The main image of the image with multiple Z_Index: https://dev.rebuildingakidney.org/ermrest/catalog/2/entity/Gene_Expression:Processed_Image/Reference_Image=16-2GJM&Z_Index=81
The pagination request for getting the Z_Index images: https://dev.rebuildingakidney.org/ermrest/catalog/2/attributegroup/Gene_Expression:Processed_Image/Reference_Image=16-2GJM/Z_Index;a:=array(*)@sort(Z_Index)@after(50)?limit=25
How to fake the Processed_Image data to add more Z_Index records:
Make sure the value of uri
column in the Image table is saved somewhere.
Send a PUT request to remove the uri
value:
PUT https://dev.rebuildingakidney.org/ermrest/catalog/2/attributegroup/Gene_Expression:Image/RID;uri
Content-Type: application/json
[
{
"RID": "16-2E4P",
"uri": null
}
]
Find the existing Processed_Image records and make sure existing Z_Index values are not-null
GET https://dev.rebuildingakidney.org/ermrest/catalog/2/entity/Gene_Expression:Processed_Image/Reference_Image=16-2E4P
If you need change the Z_Index you would sent a PUT request with the proper value
PUT https://dev.rebuildingakidney.org/ermrest/catalog/2/attributegroup/Gene_Expression:Processed_Image/RID;Z_Index
Content-Type: application/json
[
{
"RID": "<the rid of processed_image record>",
"Z_Index": 0
}
]
Send a POST request to add the new entries. Make sure Reference_Image
, Channel_Number
, and Z_Index
values are correct. Also copy the File_URL
, File_Bytes
, and File_MD5
of one of the existing records. Make sure you've noted the RID of records that you created. So later we won't be confused by this fake data. These are the RID of records that I created during the call for this table: 18-MKVY
, 18-MKW0
POST https://dev.rebuildingakidney.org/ermrest/catalog/2/entity/Gene_Expression:Processed_Image
[
{
"Reference_Image": "16-2E4P",
"Channel_Number": 0,
"Z_Index": 1,
"File_URL": "/hatrac/resources/gene_expression/pyramidal_tiff/2018/3b10e1732b0e5013bf2ec228803fcce2:YVG4QOQ7PR2GRUSJYAIKJ5G4FI",
"File_Bytes": 225153692,
"File_MD5": "3b10e1732b0e5013bf2ec228803fcce2"
},
{
"Reference_Image": "16-2E4P",
"Channel_Number": 0,
"Z_Index": 2,
"File_URL": "/hatrac/resources/gene_expression/pyramidal_tiff/2018/3b10e1732b0e5013bf2ec228803fcce2:YVG4QOQ7PR2GRUSJYAIKJ5G4FI",
"File_Bytes": 225153692,
"File_MD5": "3b10e1732b0e5013bf2ec228803fcce2"
}
]
This is part of #57 epic. I wanted to have a pointer so I can document what we decided during our meetings so it might be a little hard to read and follow.
The following are the summary of interactions and what needs to be done for each one:
On load (chaise):
The main image:
/entity/Gene_Expression:Processed_image/Z_Index=val
)The list of images (based on page size) to be displayed below the main image as carrousel:
On load (OSD viewer):
{i@d}/full/150,150/0/default.jpg
for the first channel where150,150
is the size of thumbnails that we want to show.On change page in carrousel:
On click on a thumbnail: