Skip to content

pad 1 or 2 channel images saved in gui window .stack#1471

Closed
mrariden wants to merge 1 commit into
mainfrom
mr/fix/init_images_gui
Closed

pad 1 or 2 channel images saved in gui window .stack#1471
mrariden wants to merge 1 commit into
mainfrom
mr/fix/init_images_gui

Conversation

@mrariden

Copy link
Copy Markdown
Collaborator

2D images loaded into the 2D CP GUI would load correctly but were incorrectly padded to 1 channel instead of 3 channels. Previously, 2 channel images were correctly padded but not 1. The input to the network requires 3 channels.

The GUI currently shows red instead of gray because this line doesn't fire:

if len(np.unique(image[..., 1:])) == 1:

The root cause of this is the different behavior of transforms.convert_image() which guaranteed a 3 channel image.

@mrariden mrariden requested a review from carsen-stringer June 12, 2026 23:23
@mrariden mrariden marked this pull request as ready for review June 12, 2026 23:23
@carsen-stringer

Copy link
Copy Markdown
Member

To reduce memory I didn't pad the images, could we just make the gray channel open instead of red?

@mrariden mrariden closed this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants