Creating tile experiment file in OAD

Post your acquisition-related questions and macros here
Post Reply
user-5147
Posts: 11
Joined: Thu Jan 01, 1970 1:00 am

Creating tile experiment file in OAD

Post by user-5147 »

Solved
Forget this post, I did a mistake with the image size. However, how can I find the z focus position of the preview image ? Also how can I set the magnification on an AxioZoom ?
Thanks
Philippe

Hi,
I trying to use OAD macro-environment to detect brain sections on slide and acquire tile regions automatically. To do that, I define a tile acquisition outlining all sections on the slide, then perform a preview image and save the stitched image. On this image I run ImageJ macro to detect slices, compute the bounding boxes for each sections and convert coordinates to stage positions (as in rare event detection macro example) and generate a tile experiment file (.czsh) . Then, I import the tile experiment file to run the acquisition. However, first the Z focus is empty using zPosition = image.Metadata.FocusPosition.split(" "); second the stage position seems not good. In the below tile exp file the tile named #section1 is calculated with the macro and the tile named TR1 is manually define. I done similar rare event detection with success using list position points. My question is the preview image have correct metadata as the "classical" image acquisition ?
Philippe

<?xml version="1.0" encoding="utf-8"?>
<SampleHolder>
<Overlap>0.1</Overlap>
<ScanMode>Meander</ScanMode>
<PositionedRegionsScanMode>FirstYThenX</PositionedRegionsScanMode>
<TemplateShapesScanMode>Meander</TemplateShapesScanMode>
<IsConstantTiles>false</IsConstantTiles>
<TileRegionAnchorMode>Center</TileRegionAnchorMode>
<StageReferencePoint>0,0</StageReferencePoint>
<UseStageBacklashCorrection>true</UseStageBacklashCorrection>
<UseFocusBacklashCorrection>true</UseFocusBacklashCorrection>
<IsOptimizedPositionedRegionsSorting>true</IsOptimizedPositionedRegionsSorting>
<IsOptimizedTemplateShapesSorting>true</IsOptimizedTemplateShapesSorting>
<UseStageContinualSpeed>false</UseStageContinualSpeed>
<StageContinualSpeed>1</StageContinualSpeed>
<MoveToLoadPositionBetweenShapes>false</MoveToLoadPositionBetweenShapes>
<SplitScenesInSeparateFiles>false</SplitScenesInSeparateFiles>
<TileRegionCoveringMode>AlignedToLocalTileRegion</TileRegionCoveringMode>
<TemplateShapesFillMode>FillGrade</TemplateShapesFillMode>
<TemplateShapesFillGrade>0.25</TemplateShapesFillGrade>
<TemplateShapesFillWidth>10</TemplateShapesFillWidth>
<TemplateShapesFillHeight>10</TemplateShapesFillHeight>
<IsOnlineStitchingEnabled>false</IsOnlineStitchingEnabled>
<IsOnlinePyramidEnabled>true</IsOnlinePyramidEnabled>
<GlobalInterpolationExpansionDegree>2</GlobalInterpolationExpansionDegree>
<LocalInterpolationExpansionDegree>2</LocalInterpolationExpansionDegree>
<IsFocusSurfaceOutlierRemovingEnabled>true</IsFocusSurfaceOutlierRemovingEnabled>
<FocusSurfaceOutlierExpansionDegree>1</FocusSurfaceOutlierExpansionDegree>
<FocusSurfaceOutlierThresholdSigma>2.5</FocusSurfaceOutlierThresholdSigma>
<DelayAfterStageMove>0</DelayAfterStageMove>
<OnlineStitchingParameter>
<UseFocusReferenceChannel>true</UseFocusReferenceChannel>
<ReferenceChannelId>0</ReferenceChannelId>
</OnlineStitchingParameter>
<AllowedScanArea IsActivated="false">
<ContourType>Rectangle</ContourType>
<Center>0,0</Center>
<Size>0,0</Size>
</AllowedScanArea>
<TileRegions>
<TileRegion Name="#Section1" Id="66666601126">
<CenterPosition>85239.677,53606.76</CenterPosition>
<ContourSize>15777.64,9996.274</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section2" Id="666666119322">
<CenterPosition>85331.515,71580.674</CenterPosition>
<ContourSize>15333.541,10072.982</ContourSize>
<Columns>13</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section3" Id="666666219023">
<CenterPosition>90877.702,71590.767</CenterPosition>
<ContourSize>15951.242,10145.652</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section4" Id="66666631376">
<CenterPosition>90884.757,54020.58</CenterPosition>
<ContourSize>16104.659,9875.155</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="TR1" Id="636548953094173634">
<CenterPosition>76952.198,43067.118</CenterPosition>
<ContourSize>16527.196,11795.412</ContourSize>
<Columns>14</Columns>
<Rows>10</Rows>
<Z>-147275</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
</TileRegions>
<SingleTileRegions />
<SingleTileRegionArrays />
</SampleHolder>
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

how can I find the z focus position of the preview image ? Also how can I set the magnification on an AxioZoom ?
The z-focus position can be found in the metadata of the image.
An alternative might be to have a look at Zen.Devices.Focus etc.

The magnification is in the experiment setting, which is an XML.
To change the magnification you have to modify the XML file and load the experiment again.

I hope this helps ...
julie diane
Posts: 19
Joined: Wed Jun 28, 2023 1:25 am

Re: Creating tile experiment file in OAD

Post by julie diane »

user-5147 wrote: Thu Feb 22, 2018 2:32 pm Solved
Forget this post, I did a mistake with the image size. However, how can I find the z focus position of the preview image ? Also how can I set the magnification on an AxioZoom ?
Thanks
Philippe

Hi,
I trying to use OAD macro-environment to detect brain sections on slide and acquire tile regions automatically. To do that, I define a tile acquisition outlining all sections on the slide, then perform a preview image and save the stitched image. On this image I run ImageJ macro to detect slices, compute the bounding boxes for each section and convert coordinates to stage positions (as in rare event detection macro example) and generate a tile experiment file of Business Advisory UAE(.czsh) . Then, I import the tile experiment file to run the acquisition. However, first the Z focus is empty using zPosition = image.Metadata.FocusPosition.split(" "); second the stage position seems not good. In the below tile exp file the tile named #section1 is calculated with the macro and the tile named TR1 is manually define. I done similar rare event detection with success using list position points. My question is the preview image have correct metadata as the "classical" image acquisition ?
Philippe

<?xml version="1.0" encoding="utf-8"?>
<SampleHolder>
<Overlap>0.1</Overlap>
<ScanMode>Meander</ScanMode>
<PositionedRegionsScanMode>FirstYThenX</PositionedRegionsScanMode>
<TemplateShapesScanMode>Meander</TemplateShapesScanMode>
<IsConstantTiles>false</IsConstantTiles>
<TileRegionAnchorMode>Center</TileRegionAnchorMode>
<StageReferencePoint>0,0</StageReferencePoint>
<UseStageBacklashCorrection>true</UseStageBacklashCorrection>
<UseFocusBacklashCorrection>true</UseFocusBacklashCorrection>
<IsOptimizedPositionedRegionsSorting>true</IsOptimizedPositionedRegionsSorting>
<IsOptimizedTemplateShapesSorting>true</IsOptimizedTemplateShapesSorting>
<UseStageContinualSpeed>false</UseStageContinualSpeed>
<StageContinualSpeed>1</StageContinualSpeed>
<MoveToLoadPositionBetweenShapes>false</MoveToLoadPositionBetweenShapes>
<SplitScenesInSeparateFiles>false</SplitScenesInSeparateFiles>
<TileRegionCoveringMode>AlignedToLocalTileRegion</TileRegionCoveringMode>
<TemplateShapesFillMode>FillGrade</TemplateShapesFillMode>
<TemplateShapesFillGrade>0.25</TemplateShapesFillGrade>
<TemplateShapesFillWidth>10</TemplateShapesFillWidth>
<TemplateShapesFillHeight>10</TemplateShapesFillHeight>
<IsOnlineStitchingEnabled>false</IsOnlineStitchingEnabled>
<IsOnlinePyramidEnabled>true</IsOnlinePyramidEnabled>
<GlobalInterpolationExpansionDegree>2</GlobalInterpolationExpansionDegree>
<LocalInterpolationExpansionDegree>2</LocalInterpolationExpansionDegree>
<IsFocusSurfaceOutlierRemovingEnabled>true</IsFocusSurfaceOutlierRemovingEnabled>
<FocusSurfaceOutlierExpansionDegree>1</FocusSurfaceOutlierExpansionDegree>
<FocusSurfaceOutlierThresholdSigma>2.5</FocusSurfaceOutlierThresholdSigma>
<DelayAfterStageMove>0</DelayAfterStageMove>
<OnlineStitchingParameter>
<UseFocusReferenceChannel>true</UseFocusReferenceChannel>
<ReferenceChannelId>0</ReferenceChannelId>
</OnlineStitchingParameter>
<AllowedScanArea IsActivated="false">
<ContourType>Rectangle</ContourType>
<Center>0,0</Center>
<Size>0,0</Size>
</AllowedScanArea>
<TileRegions>
<TileRegion Name="#Section1" Id="66666601126">
<CenterPosition>85239.677,53606.76</CenterPosition>
<ContourSize>15777.64,9996.274</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section2" Id="666666119322">
<CenterPosition>85331.515,71580.674</CenterPosition>
<ContourSize>15333.541,10072.982</ContourSize>
<Columns>13</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section3" Id="666666219023">
<CenterPosition>90877.702,71590.767</CenterPosition>
<ContourSize>15951.242,10145.652</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="#Section4" Id="66666631376">
<CenterPosition>90884.757,54020.58</CenterPosition>
<ContourSize>16104.659,9875.155</ContourSize>
<Columns>14</Columns>
<Rows>9</Rows>
<Z>-140000</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
<TileRegion Name="TR1" Id="636548953094173634">
<CenterPosition>76952.198,43067.118</CenterPosition>
<ContourSize>16527.196,11795.412</ContourSize>
<Columns>14</Columns>
<Rows>10</Rows>
<Z>-147275</Z>
<TemplateShapeId></TemplateShapeId>
<IsUsedForAcquisition>true</IsUsedForAcquisition>
<IsProtected>false</IsProtected>
<AreSupportPointsOutsideContourAllowed>false</AreSupportPointsOutsideContourAllowed>
<PreferSupportPointsZ>false</PreferSupportPointsZ>
<Contour Type="Rectangle" />
<SupportPoints />
</TileRegion>
</TileRegions>
<SingleTileRegions />
<SingleTileRegionArrays />
</SampleHolder>
Z Focus Position:

The XML file you've shared seems to contain information related to the tile regions, including their positions and sizes. The Z positions are specified for each tile region, likely indicating the focus level for capturing images in the Z-axis.
To find the Z focus position of the preview image, you need to check the metadata of the captured preview image. The Z focus position might not be present in the provided XML but could be available in the metadata of the actual preview image file. You would typically access this information using the software or tool you're using for microscope imaging.
Setting Magnification on AxioZoom:

Setting the magnification on a microscope like the AxioZoom usually involves adjusting the microscope's objectives or lenses. The specific steps may vary depending on the microscope model and software control.
Generally, you should be able to change the magnification by selecting the appropriate objective lens or zoom level using the microscope's control software or hardware interface.
If you are using ZEN software for controlling your AxioZoom microscope, there should be options to adjust the magnification in the software interface.
Metadata and Preview Image:

Ensure that the metadata associated with the preview image includes the Z focus position. If it doesn't, you may need to configure your microscope software or hardware to capture this information.
Make sure that the software you are using to run the OAD macro-environment captures and stores all relevant metadata, including Z focus positions, with the preview image.
For more precise assistance and troubleshooting related to your specific microscope setup, OAD macro-environment, and software, it may be helpful to consult the user manuals and documentation provided with your microscope and software, or reach out to the manufacturer's support or community forums for guidance tailored to your equipment and software configuration.
Post Reply