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>