Sorting out images in a directory

Hi all!
I am pretty new to knime and i am investing my first days in exploring the tutorials and the forum.
Maybe the following is a stupid question, and if it is i apologise, but for now i am stuck and can’t find a way out by myself.

In a folder i have several images with the name <01-12>_000<0-2>. In this pattern, from 01 to 12 i have the different samples and from 0 to 2 i have the different channels of the same sample.
What i would like to do is to organise the images in a way where for each sample i can easily merge or work on the 3 channels.

Maybe having in each column a sample and in each row the channel?

1 Like

Hi there @Vall,

welcome to KNIME Community Forum!

Just to see if I got it right. You have images with following names for example:

01_0000
01_0001
01_0002
02_0001
02_0002
03_0000
03_0002

I would say opposite. One row contains one sample and you have 3 columns that corresponds to 3 channels. That makes sense?

Br,
Ivan

Hi there @ipazin

Yeah, i meant that, but my brain produced the opposite sorry. ahah

The images are organised like this.
01_0000
01_0001
01_0002
02_0000
02_0001
02_0002

and so on.

Cheers,
Valerio

1 Like

Hi @Vall,

this workflow

comes from a similar problem: I have to place 7 camera outputs column based and the time sequences row based. My Group Loop Start input:

and the Loop End Output:

For your solution you have to split the sample names into samples [00-12] and channels [0000-0002]. Group Loop Start with samples, rename rows with channel column entries [0000-0002], filter all columns except image-column, transpose, possibly resort the columns, and merge some of the sorted out columns, collect the results with Loop End (hint: check -> Allow changing table specifications).

I hope it helps.
Andrew

4 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.