-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add roi edit #106
Feature/add roi edit #106
Conversation
# Conflicts: # frontend/src/components/Workspace/Visualize/Plot/ImagePlot.tsx # frontend/src/const/Mode.ts
# Conflicts: # frontend/src/api/outputs/Outputs.ts # frontend/src/components/Workspace/Visualize/Plot/ImagePlot.tsx
frontend/src/components/Workspace/Visualize/VisualizeItemLayoutMenuIcon.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Workspace/Visualize/VisualizeItemLayoutMenuIcon.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Workspace/Visualize/VisualizeItemLayoutMenuIcon.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Workspace/Visualize/VisualizeItemLayoutMenuIcon.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Workspace/Visualize/VisualizeItemLayoutMenuIcon.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # frontend/src/components/Workspace/Visualize/Plot/ImagePlot.tsx
@ReiHashimoto @itutu-tienday Screen.Recording.2023-12-07.at.13.53.21.mov |
if (!edit) | ||
return ( | ||
<LinkDiv sx={{ width: "fit-content" }} onClick={editRoi}> | ||
Edit ROI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever I execute an Edit ROI on a RECORD executed in another branch (such as develop-main at this time), the Roi Edit-related API always seems to respond with a 400 error.
*If the RECORD was generated in this branch, it seems to work fine.
Is this a known issue? (Is backward compatibility of outnput data lost?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itutu-tienday As far as I can see, it seems that in the develop-main request Url has not added the workspace_id param, so that's why it happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanglevinh
Thank you.
request Url has not added the workspace_id param
Which request is this?
Since the pkl file doesn't seem to be read well by BE (I get a 400 error), is this a request that affects the generation of the pkl file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itutu-tienday
As far as I see the api, it requires the workspace_id param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanglevinh
Even without calling add_roi, the following operation seems to generate a 400 error.
Example)
- RUN Workflow in develop-main
- Switch branch to add_ROI_edit+improve-edit-roi
- Visualize→Select Roi→select cell_roi
- Select Edit ROI and 400 error
- The API for the error is
POST /outputs/image/*/status?workspace_id=1
.
- The API for the error is
If you don't mind, could you please share the above with BE's?
@ReiHashimoto
Can you reproduce it in your environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itutu-tienday
I talked to BE,
The ROI editing data of develop and improve-edit-roi are not the same, causing error 400
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even without calling add_roi, the following operation seems to generate a 400 error.
It reproduces in my environment, too.
On selecting roi data, it calls /image/{filepath:path}/status
endpoint.
The ROI editing data of develop and improve-edit-roi are not the same, causing error 400
Yes, in improve-edit-roi branch, "edit_roi_data" was added to output dict.
e.g. studio/app/optinist/wrappers/suite2p/roi.py
info = {
"ops": Suite2pData(ops),
...
"edit_roi_data": EditRoiData(images=ImageData(ops["filelist"]).data, im=im),
"nwbfile": nwbfile,
}
I think the cause is the following BE code.
studio/app/optinist/core/edit_ROI/edit_ROI.py
self.data = self.output_info.get("edit_roi_data", {})
self.tmp_data: EditRoiData = self.tmp_output_info.get(
"edit_roi_data", self.data
)
if not isinstance(self.tmp_data, EditRoiData):
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
at self.tmp_data: EditRoiData ...
,
if we can't get data with "edit_roi_data" key, maybe we need to assign new EditRoiData instance.
4e643e4
to
db08bcc
Compare
No description provided.