# CSJ2K.j2k.roi.encoder.RectROIMaskGenerator.getROIMask

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_roi_encoder_RectROIMaskGenerator_getROIMask_" data-uid="CSJ2K.j2k.roi.encoder.RectROIMaskGenerator.getROIMask*">getROIMask Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_roi_encoder_RectROIMaskGenerator_getROIMask_" data-uid="CSJ2K.j2k.roi.encoder.RectROIMaskGenerator.getROIMask*"></a>
<h4 id="CSJ2K_j2k_roi_encoder_RectROIMaskGenerator_getROIMask_CSJ2K_j2k_image_DataBlkInt_CSJ2K_j2k_wavelet_Subband_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.roi.encoder.RectROIMaskGenerator.getROIMask(CSJ2K.j2k.image.DataBlkInt,CSJ2K.j2k.wavelet.Subband,System.Int32,System.Int32)">getROIMask(DataBlkInt, Subband, int, int)</h4>
<div class="markdown level1 summary"><p>This functions gets a DataBlk with the size of the current code-block
and fills it with the ROI mask. The lowest scaling value in the mask
for this code-block is returned by the function to be used for
modifying the rate distortion estimations.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override bool getROIMask(DataBlkInt db, Subband sb, int magbits, int c)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function getROIMask(db As DataBlkInt, sb As Subband, magbits As Integer, c As Integer) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.image.DataBlkInt.html">DataBlkInt</a></td>
      <td><span class="parametername">db</span></td>
      <td><p>The data block that is to be filled with the mask</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.wavelet.Subband.html">Subband</a></td>
      <td><span class="parametername">sb</span></td>
      <td><p>The root of the current subband tree</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">magbits</span></td>
      <td><p>The number of magnitude bits in this code-block</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">c</span></td>
      <td><p>Component number</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Whether or not a mask was needed for this tile</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="CSJ2K.j2k.roi.encoder.ROIMaskGenerator.getROIMask.html#CSJ2K_j2k_roi_encoder_ROIMaskGenerator_getROIMask_CSJ2K_j2k_image_DataBlkInt_CSJ2K_j2k_wavelet_Subband_System_Int32_System_Int32_">ROIMaskGenerator.getROIMask(DataBlkInt, Subband, int, int)</a></div>
</div>
