Code covered by the BSD License  

Highlights from
File Ordering Patch Utility for MATLAB

5.0

5.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 423 KB File ID: #29033
image thumbnail

File Ordering Patch Utility for MATLAB

by

 

15 Oct 2010 (Updated )

The utility patches the reordering considering the length of the filename during the sorting.

| Watch this File

File Information
Description

main executing reference usage: usage_DisplaySelectedAllImagesOfaFileTypeFromDirectory.m

Matlab file listing list the selected files in such order, which may cause some problems for certain bulk processing for benchmark applications.

imageFiles =

chp_mri_squareSized_0.jpg
chp_mri_squareSized_1.jpg
chp_mri_squareSized_10.jpg
chp_mri_squareSized_11.jpg
chp_mri_squareSized_12.jpg
chp_mri_squareSized_13.jpg
chp_mri_squareSized_14.jpg
chp_mri_squareSized_15.jpg
chp_mri_squareSized_16.jpg
chp_mri_squareSized_17.jpg
chp_mri_squareSized_18.jpg
chp_mri_squareSized_19.jpg
chp_mri_squareSized_2.jpg
chp_mri_squareSized_20.jpg
chp_mri_squareSized_21.jpg
chp_mri_squareSized_22.jpg
chp_mri_squareSized_23.jpg
chp_mri_squareSized_24.jpg
chp_mri_squareSized_25.jpg
chp_mri_squareSized_26.jpg
chp_mri_squareSized_27.jpg
chp_mri_squareSized_28.jpg
chp_mri_squareSized_29.jpg
chp_mri_squareSized_3.jpg
chp_mri_squareSized_4.jpg
chp_mri_squareSized_5.jpg
chp_mri_squareSized_6.jpg
chp_mri_squareSized_7.jpg
chp_mri_squareSized_8.jpg
chp_mri_squareSized_9.jpg

The utility patches the reordering in such manner that the files may be picked up in the following order.

imageFiles =

    'chp_mri_squareSized_0.jpg'
    'chp_mri_squareSized_1.jpg'
    'chp_mri_squareSized_2.jpg'
    'chp_mri_squareSized_3.jpg'
    'chp_mri_squareSized_4.jpg'
    'chp_mri_squareSized_5.jpg'
    'chp_mri_squareSized_6.jpg'
    'chp_mri_squareSized_7.jpg'
    'chp_mri_squareSized_8.jpg'
    'chp_mri_squareSized_9.jpg'
    'chp_mri_squareSized_10.jpg'
    'chp_mri_squareSized_11.jpg'
    'chp_mri_squareSized_12.jpg'
    'chp_mri_squareSized_13.jpg'
    'chp_mri_squareSized_14.jpg'
    'chp_mri_squareSized_15.jpg'
    'chp_mri_squareSized_16.jpg'
    'chp_mri_squareSized_17.jpg'
    'chp_mri_squareSized_18.jpg'
    'chp_mri_squareSized_19.jpg'
    'chp_mri_squareSized_20.jpg'
    'chp_mri_squareSized_21.jpg'
    'chp_mri_squareSized_22.jpg'
    'chp_mri_squareSized_23.jpg'
    'chp_mri_squareSized_24.jpg'
    'chp_mri_squareSized_25.jpg'
    'chp_mri_squareSized_26.jpg'
    'chp_mri_squareSized_27.jpg'
    'chp_mri_squareSized_28.jpg'
    'chp_mri_squareSized_29.jpg'

If the utility have more optimal approach, please do not hesitate to suggest and send feedback to author.
Email: promethevx@yahoo.com.

Thank you.

Regards,
Michael Chan JT

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
16 Oct 2010 Joan

very clean codes

15 Oct 2010 Michael Chan

Pardon the overlapping of the titles on the image display. The focus is on the patch. There is also a uility to display all images under a specified file type. It would also be good if we have an option for display all image types.

Thank you, Douglas Schwarz. I didn't find that initially. I have also always ensure that the coding is intuitive and commented.

15 Oct 2010 Jan Simon

I think the screen shot is funny, but rather confusing.

15 Oct 2010 Douglas Schwarz

See <http://www.mathworks.com/matlabcentral/fileexchange/10959-sortnat-natural-order-sort> for a similar function.

Updates
18 Oct 2010

>> Suggestion from Donn Shull
listFilesInDirectory.m:
Emend to avoid loops and may be quicker for a large number of files.

Contact us