mobie / mobie-viewer-fiji

BSD 2-Clause "Simplified" License
29 stars 12 forks source link

Are the is2D arguments in ImagesCreatorTest necessary? #1118

Open tischi opened 3 months ago

tischi commented 3 months ago

@K-Meech

I am working one those branches: new-n5, both in mobie-io and in mobie-viewer-fiji.

I am at a stage where at least both repos are compiling :-)

So, if you would like to help those would be the branches to checkout and compile.

Question: Are the is2D arguments in many of the functions of the ImagesCreatorTest necessary? I did not really understand their purpose.

K-Meech commented 3 months ago

As far as I remember, these are necessary to make sure that bigdataviewer is locked to only 2D for projects with all 2D images. Otherwise, they get displayed with 3D controls which makes it easy to lose where you are.

tischi commented 3 months ago

Yeah, but I would think that the ImagesCreatorTest runs headless?

K-Meech commented 3 months ago

Yes it does run headless, but I think it's mainly for the four final tests here i.e. add2DImageTo3DDataset onwards. is2D is there so that 2D/3D images and datasets can be easily created - this allows these tests to check that 2D images can be added/copied to a 3D dataset, but 3D images can't be added to 2D datasets (it checks that an UnsupportedOperationException is thrown)