Create a contour

CreateNewROI = "Add Region Of Interest"; //This creates a blank contour with no slices

Name contour

RoiList.Current.Name = "SomeName";

Choose contour's associated dataset

//(RoiList.Current.VolumeName = Dataset Name)
RoiList.Current.VolumeName = VolumeList.#"#1".Name; //where the index # corresponds to the dataset index (0=primary, 1=secondary #1, etc)

Contour display

RoiList.Current.Display2dWithMeshCheck = "Both";//Supports other options like "Contour", "Colorwash", "Poly", "Mesh", "Off"

Contour color

RoiList.Current.Color = "blue"; //Supports generic Pinnacle colors like "red", "green", "yellow", "purple", "skyblue", etc

Clean contour

RoiList.Current.CurveMinArea = "100"; //Minimum curve area
RoiList.Current.CurveOverlapMinimum = "88"; //Minimum curve overlap
RoiList.Current.Clean = "Rescan"; //Scan for nonconforming curves
RoiList.Current.CleanAndDelete = "Delete Curves"; //Delete non-conforming curves


Set max and min autocontour thresholds

RoiList.Current.AutoLower = "200";
RoiList.Current.AutoUpper = "4096";

Set the boundary box

RoiList.Current.ApplyBoundingBox = 1;

//These can be used or commented out. They aren't necessary to perform the autocontour
RoiList.Current.BoundingBox.DisplayXOrigin = "-60";
RoiList .Current.BoundingBox.DisplayYOrigin = TrialList.Current.CouchRemovalYCoordinate;//Only contours above the couch removal line, this can be a number too.
RoiList.Current.BoundingBox.DisplayZOrigin = "0";
RoiList.Current.BoundingBox.Size.X = "128";
RoiList.Current.BoundingBox.Size.Y = "128";
RoiList.Current.BoundingBox.Size.Z = "38.0999";

Perform autocontour

RoiList.Current.AutoContourROI = "Current Region Of Interest";

Contour coordinates

X direction (i.e. Sagittal Orientation)

RoiList.Current.BinaryVolume.XMin;//First CT slice containing contour in X coordinate. 
RoiList.Current.BinaryVolume.XMax;//Last CT slice containing contour in X coordinate.

Y direction (i.e. Coronal Orientation)

The Y coordinate is different from the others in that instead of providing the CT slice number, the variable contains a value equal to the #CT slices - Slice Number. In most, and maybe all, cases there are 512 slices in the CT in the Y direction. So, to find the slice number, simply subtract the number provided by Pinnacle from 512.

RoiList.Current.BinaryVolume.YMin;// "# of CT Slices-First CT" slice containing contour in Y direction

Z direction (i.e. Transverse Orientation)

RoiList.Current.BinaryVolume.ZMin;//First CT slice containing contour in Z coordinate.


Set current window view to first CT slice containing the current contour.

ViewWindowList.Current.UserSliceNumber = RoiList.Current.BinaryVolume.ZMin;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License