# CSJ2K.j2k.roi.encoder.ROIScaler

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_roi_encoder_ROIScaler" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler" class="text-break">ROIScaler Class
</h1>
  <div class="markdown level0 summary"></div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="CSJ2K.j2k.image.ImgDataAdapter.html">ImgDataAdapter</a></div>
    <div class="level2"><span class="xref">ROIScaler</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.html">CBlkQuantDataSrcEnc</a></div>
    <div><a class="xref" href="CSJ2K.j2k.wavelet.analysis.ForwWTDataProps.html">ForwWTDataProps</a></div>
    <div><a class="xref" href="CSJ2K.j2k.image.ImgData.html">ImgData</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.roi.encoder.html">CSJ2K.j2k.roi.encoder</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_roi_encoder_ROIScaler_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ROIScaler : ImgDataAdapter, CBlkQuantDataSrcEnc, ForwWTDataProps, ImgData</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ROIScaler
    Inherits ImgDataAdapter
    Implements CBlkQuantDataSrcEnc, ForwWTDataProps, ImgData</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler__ctor_CSJ2K_j2k_quantization_quantizer_Quantizer_CSJ2K_j2k_roi_encoder_ROIMaskGenerator_System_Boolean_System_Int32_System_Boolean_CSJ2K_j2k_encoder_EncoderSpecs_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.#ctor(CSJ2K.j2k.quantization.quantizer.Quantizer,CSJ2K.j2k.roi.encoder.ROIMaskGenerator,System.Boolean,System.Int32,System.Boolean,CSJ2K.j2k.encoder.EncoderSpecs)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.-ctor.html#CSJ2K_j2k_roi_encoder_ROIScaler__ctor_CSJ2K_j2k_quantization_quantizer_Quantizer_CSJ2K_j2k_roi_encoder_ROIMaskGenerator_System_Boolean_System_Int32_System_Boolean_CSJ2K_j2k_encoder_EncoderSpecs_">ROIScaler(Quantizer, ROIMaskGenerator, bool, int, bool, EncoderSpecs)</a>
        </td>
        <td class="markdown level1 summary"><p>Constructor of the ROI scaler, takes a Quantizer as source of data to
scale.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_OPT_PREFIX" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.OPT_PREFIX">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.OPT_PREFIX.html">OPT_PREFIX</a>
        </td>
        <td class="markdown level1 summary"><p>The prefix for ROI Scaler options: 'R'</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_BlockAligned" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.BlockAligned">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.BlockAligned.html#CSJ2K_j2k_roi_encoder_ROIScaler_BlockAligned">BlockAligned</a>
        </td>
        <td class="markdown level1 summary"><p>This function returns the blockAligned flag</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_CbULX" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.CbULX">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.CbULX.html#CSJ2K_j2k_roi_encoder_ROIScaler_CbULX">CbULX</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the horizontal offset of the code-block partition. Allowable
values are 0 and 1, nothing else.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_CbULY" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.CbULY">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.CbULY.html#CSJ2K_j2k_roi_encoder_ROIScaler_CbULY">CbULY</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the vertical offset of the code-block partition. Allowable
values are 0 and 1, nothing else.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_ParameterInfo" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.ParameterInfo">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.ParameterInfo.html#CSJ2K_j2k_roi_encoder_ROIScaler_ParameterInfo">ParameterInfo</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the parameters that are used in this class and
implementing classes. It returns a 2D String array. Each of the
1D arrays is for a different option, and they have 3
elements. The first element is the option name, the second one
is the synopsis, the third one is a long description of what
the parameter is and the fourth is its default value. The
synopsis or description may be 'null', in which case it is
assumed that there is no synopsis or description of the option,
respectively. Null may be returned if no options are supported.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_ROIMaskGenerator" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.ROIMaskGenerator">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.ROIMaskGenerator.html#CSJ2K_j2k_roi_encoder_ROIScaler_ROIMaskGenerator">ROIMaskGenerator</a>
        </td>
        <td class="markdown level1 summary"><p>This function returns the ROI mask generator.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_createInstance_CSJ2K_j2k_quantization_quantizer_Quantizer_CSJ2K_j2k_util_ParameterList_CSJ2K_j2k_encoder_EncoderSpecs_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.createInstance(CSJ2K.j2k.quantization.quantizer.Quantizer,CSJ2K.j2k.util.ParameterList,CSJ2K.j2k.encoder.EncoderSpecs)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.createInstance.html#CSJ2K_j2k_roi_encoder_ROIScaler_createInstance_CSJ2K_j2k_quantization_quantizer_Quantizer_CSJ2K_j2k_util_ParameterList_CSJ2K_j2k_encoder_EncoderSpecs_">createInstance(Quantizer, ParameterList, EncoderSpecs)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a ROIScaler object. The Quantizer is the source of data to
scale.</p>
<pre><code>       &lt;p&gt;The ROI Scaler creates a ROIMaskGenerator depending on what ROI
       information is in the ParameterList. If only rectangular ROI are used,
       the fast mask generator for rectangular ROI can be used.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_getAnSubbandTree_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.getAnSubbandTree(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.getAnSubbandTree.html#CSJ2K_j2k_roi_encoder_ROIScaler_getAnSubbandTree_System_Int32_System_Int32_">getAnSubbandTree(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a reference to the subband tree structure representing the
subband decomposition for the specified tile-component.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_getNextCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.getNextCodeBlock(System.Int32,CSJ2K.j2k.wavelet.analysis.CBlkWTData)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.getNextCodeBlock.html#CSJ2K_j2k_roi_encoder_ROIScaler_getNextCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_">getNextCodeBlock(int, CBlkWTData)</a>
        </td>
        <td class="markdown level1 summary"><p>This function gets a datablk from the entropy coder. The sample sin the
block, which consists of  the quantized coefficients from the quantizer,
are scaled by the values given for any ROIs specified.</p>
<pre><code>       &lt;p&gt;The function calls on a ROIMaskGenerator to get the mask for scaling
       the coefficients in the current block.&lt;/p&gt;&lt;p&gt;The data returned by this method is a copy of the orignal
       data. Therfore it can be modified &quot;in place&quot; without any problems after
       being returned. The 'offset' of the returned data is 0, and the 'scanw'
       is the same as the code-block width. See the 'CBlkWTData' class.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_getNextInternCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.getNextInternCodeBlock(System.Int32,CSJ2K.j2k.wavelet.analysis.CBlkWTData)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.getNextInternCodeBlock.html#CSJ2K_j2k_roi_encoder_ROIScaler_getNextInternCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_">getNextInternCodeBlock(int, CBlkWTData)</a>
        </td>
        <td class="markdown level1 summary"><p>This function gets a datablk from the entropy coder. The sample sin the
block, which consists of  the quantized coefficients from the quantizer,
are scaled by the values given for any ROIs specified.</p>
<pre><code>       &lt;p&gt;The function calls on a ROIMaskGenerator to get the mask for scaling
       the coefficients in the current block.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_isReversible_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.isReversible(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.isReversible.html#CSJ2K_j2k_roi_encoder_ROIScaler_isReversible_System_Int32_System_Int32_">isReversible(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Since ROI scaling is always a reversible operation, it calls
isReversible() method of it source (the quantizer module).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_nextTile" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.nextTile">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.nextTile.html#CSJ2K_j2k_roi_encoder_ROIScaler_nextTile">nextTile()</a>
        </td>
        <td class="markdown level1 summary"><p>Advances to the next tile, in standard scan-line order (by rows then
columns). An NoNextElementException is thrown if the current tile is
the last one (i.e. there is no next tile).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_parseROIs_System_String_System_Int32_System_Collections_Generic_List_System_Object__" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs(System.String,System.Int32,System.Collections.Generic.List{System.Object})">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs.html#CSJ2K_j2k_roi_encoder_ROIScaler_parseROIs_System_String_System_Int32_System_Collections_Generic_List_System_Object__">parseROIs(string, int, List&lt;object&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>This function parses the values given for the ROIs with the argument
-Rroi. Currently only circular and rectangular ROIs are supported.</p>
<pre><code>       &lt;p&gt;A rectangular ROI is indicated by a 'R' followed the coordinates for
       the upper left corner of the ROI and then its width and height.&lt;/p&gt;&lt;p&gt;A circular ROI is indicated by a 'C' followed by the coordinates of
       the circle center and then the radius.&lt;/p&gt;&lt;p&gt;Before the R and C values, the component that are affected by the
       ROI are indicated.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_setTile_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.setTile(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.setTile.html#CSJ2K_j2k_roi_encoder_ROIScaler_setTile_System_Int32_System_Int32_">setTile(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the current tile, given the new indexes. An
IllegalArgumentException is thrown if the indexes do not
correspond to a valid tile.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_roi_encoder_ROIScaler_useRoi" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.useRoi">
          <a class="xref" href="CSJ2K.j2k.roi.encoder.ROIScaler.useRoi.html#CSJ2K_j2k_roi_encoder_ROIScaler_useRoi">useRoi()</a>
        </td>
        <td class="markdown level1 summary"><p>This function returns the flag indicating if any ROI functionality used</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
