batch processing in a folder
is there something special to do when applying a batch process to an entire folder?
Apparently there is something wrong with my reference system used in my macro :
sorry its in french
Thanks
Alban
Best Answers
-
Can you please also send me the files used in the macro: Segm finale.isg and data colector setting.adoxsd?0
-
Alban,
I checked your image and a macro, the image is good, but the macro was a mess! ;-)
It looks like you recorded it, but then manually modified changing all variables to image1, which messed up all inputs and outputs.
Next time if you modify macro manually, always check how it works running it with active image and if it works properly, only then try a batch.
I've fixed your macro and it runs properly now, including the batch. I used my own versions of ISG and ADOXSD files, which you can find in the Configuration Files folder (that is the proper location for additional files). You should replace these files by your version.
The modified project is attached.
Yuri
0
Answers
-
Ok I identified the problem:
I have a line in my macro with : MyWidth =ThisApplication.ActiveImage.Width
and as there is no active image when, I try to launch the batch process it freezes.
What can I do for that?
I found a workaround by opening a false first image, then its seems to work but if finally chokes with the folowing message:
Error in Image-Pro Premier 64-bitFailed to open file P5.zvi.The set file header is corrupt.
ErrorCode: -2076128472
Message: The set file header is corrupt.Data: System.Collections.ListDictionaryInternalInnerException: NothingTargetSite: Void Open(System.String, MediaCy.IQL.Sets.McImageSets ByRef)StackTrace: à MediaCy.IQL.Sets.IO.IMcImageSetFiles.Open(String filename, McImageSets& SetsCollection) à MediaCy.Viewers.Set.SetDocument..ctor(McApplication application, String filename)HelpLink: IQL.chm#34904Source: McImageSetFilesLib.McImageSetFilesHResult: -2076128472Call Stack: Void Open(System.String, MediaCy.IQL.Sets.McImageSets ByRef): Void .ctor(MediaCy.IQL.Application.McApplication, System.String):
Thanks
Alban0 -
Hi Alban,
If your macro type is SimpleScript, you have to put your own code inside CodeCommand (search the forum for examples). You can also check if the active image exists, something like that:
If ThisApplication.ActiveImage Is Nothing Then Exit Sub
Yuri
0 -
Thanks,
and do you know why i have the following message when launching the batch process in a folder : The set file header is corrupt.0 -
I don't know why you get the error opening this file. Can you open the file in Premier just by using File - Open dialog? What is the structure of this image set (how many channels, resolutions, z-positions, time points ...) does it have?
Yuri
0 -
Yes i can open the file normally but not with the batch process dialog.
Here are the metadata of the imagesName A1
DisplayName: A1
InitialSignature:
Title:
Owner:
Description: Image for set 'A1'
Copyright:
Modified: No
Date / Time: 26/01/2017 09:18:37
Size: 12064 x 1959
Width (px): 12 064
DPI X: 300
Width (in): 40,213
Height (px): 1 959
DPI Y: 300
Height (in): 6,53
Frame: 135,231 MB
Bytes: 141 800 256
Image: 135,231 MB
Bytes: 141 800 256
Active / Frames Count: 1 / 1
Active Frame: 1
Date / Time: 26/01/2017 09:18:37.421
X,Y Position: 0, 0
Z Position: 0
Time Point: 00:00:00
Frames Count: 1
Interpretation: RGB (48bpp)
Number Of Channels: 3
Pixel Data Type: Integer
Bits/Channel: 16
Bits/Pixel: 48
Bytes/Channel: 2
Bytes/Pixel: 6
Range Minimum: 0
Range Maximum: 65 535
CurrentSignature: Not Computed
File:
File:
1:
Full Name:
1:
Date / Time:
1:
Title:
1:
Owner:
1:
Comments:
1:
Software:
1:
Format:
1:
Compression: 8
1: 8
Lossy: Yes
1: Yes
Transform:
FileName: C:\Users\XXX\A1.zvi
Dye / Tint:
Channel Name:
Spatial Calibration: A1 (mm)
Name: A1
Unit Type: mcsuMillimeter
Unit Name: Millimeter
Unit Abbreviation: mm
Units / Pixel: 0,917 x 0,917 mm
by X: 0,917
by Y: 0,917
Pixels / Unit: 1,091 x 1,091 pixels
by X: 1,091
by Y: 1,091
McDlgLUTAdjustment::McFreeForm:
Thanks again for your support!!
Alban
0 -
Hi Alban,
Then we have to look at the image and your macro to check the problem. Can you please drop these files to this link?:Click here to upload files.
Thanks,
Yuri0 -
Thanks to take some time on my issue and sorry for the poor quality of the code, I am really a beginner...
0 -
The maco works much better now, thanks and sorry for the mess.
However i have still some trouble to load the zvi file.
Always the same error : The set file header is corrupt.
Alban0 -
Alban,
Do you have problems with any ZVI file or some specific? It worked correctly for me with the file you sent (IP-ConvertImage-04.zvi). What version of Premier do you use? If it's not 9.3, please update to the latest version at http://www.mediacy.com/support/productupdates
Yuri
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions